New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.matrix.system.fenxiao.dao.ShopRevenueFlowDao"> |
| | | <!-- 定义ShopRevenueFlow 的复杂关联map --> |
| | | <resultMap type="com.matrix.system.fenxiao.entity.ShopRevenueFlow" id="ShopRevenueFlowMap"> |
| | | <id property="id" column="id" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="revenueContent" column="revenue_content" /> |
| | | <result property="amount" column="amount" /> |
| | | <result property="businessId" column="business_id" /> |
| | | <result property="companyId" column="company_id" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 定义ShopRevenueFlow 的简单map ,本map不添加其他的关联属性 --> |
| | | <resultMap type="com.matrix.system.fenxiao.entity.ShopRevenueFlow" id="ShopRevenueFlowSimpleMap"> |
| | | <id property="id" column="id" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="revenueContent" column="revenue_content" /> |
| | | <result property="amount" column="amount" /> |
| | | <result property="businessId" column="business_id" /> |
| | | <result property="companyId" column="company_id" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectRevenuFlowList" resultType="com.matrix.system.fenxiao.entity.ShopRevenueFlow"> |
| | | select * from shop_revenue_flow |
| | | where user_id=#{record.userId} |
| | | and DATE_FORMAT(create_time,'%Y-%m')=#{record.queryTime} |
| | | <if test="record.revenueType==1"> |
| | | and amount>0 |
| | | </if> |
| | | <if test="record.revenueType==2"> |
| | | <![CDATA[ and amount<0 ]]> |
| | | </if> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | </mapper> |