| | |
| | | <?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"> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.matrix.system.score.dao.ScoreUseRecordDao"> |
| | | <!-- 定义ScoreUseRecord 的复杂关联map --> |
| | | <resultMap type="com.matrix.system.score.entity.ScoreUseRecord" id="ScoreUseRecordMap"> |
| | | <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="recType" column="rec_type" /> |
| | | <result property="recNum" column="rec_num" /> |
| | | <result property="businessId" column="business_id" /> |
| | | <result property="scoreVipDetailId" column="score_vip_detail_id" /> |
| | | <result property="preScore" column="pre_score" /> |
| | | <result property="nowScore" column="now_score" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="companyId" column="company_id" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 定义ScoreUseRecord 的简单map ,本map不添加其他的关联属性 --> |
| | | <resultMap type="com.matrix.system.score.entity.ScoreUseRecord" id="ScoreUseRecordSimpleMap"> |
| | | <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="recType" column="rec_type" /> |
| | | <result property="recNum" column="rec_num" /> |
| | | <result property="businessId" column="business_id" /> |
| | | <result property="scoreVipDetailId" column="score_vip_detail_id" /> |
| | | <result property="preScore" column="pre_score" /> |
| | | <result property="nowScore" column="now_score" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="companyId" column="company_id" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectFlowList" resultType="com.matrix.system.shopXcx.api.vo.ScoreUseRecordVo"> |
| | | |
| | | select a.*, |
| | | b.SHOP_NAME, |
| | | c.su_name as optionName |
| | | from score_use_record a |
| | | left join sys_shop_info b on a.shop_id=b.id |
| | | left join sys_users c on a.opration_user_id=c.su_id |
| | | <where> |
| | | |
| | | <if test="(record.vipId!=null and record.vipId!='')"> |
| | | and a.vip_id=#{record.vipId} |
| | | </if> |
| | | |
| | | <if test="record.remarks!=null and record.remarks!=''"> |
| | | and a.remarks like concat('%',#{record.remarks},'%') |
| | | </if> |
| | | |
| | | <if test="record.queryTime!=null and record.queryTime!=''"> |
| | | and DATE_FORMAT(a.create_time,'%Y-%m')=#{record.queryTime} |
| | | </if> |
| | | |
| | | <if test="record.beginTime != null and record.endTime!=null"> |
| | | and (date(a.create_time) between #{record.beginTime} and #{record.endTime}) |
| | | </if> |
| | | |
| | | <if test="record.revenueType==1"> |
| | | and a.rec_num>0 |
| | | </if> |
| | | <if test="record.revenueType==2"> |
| | | <![CDATA[ and a.rec_num<0 ]]> |
| | | </if> |
| | | </where> |
| | | order by a.create_time desc |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |