From e636396c6c16f56931edc8b57b8efb6b9a165786 Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期五, 29 八月 2025 17:59:09 +0800 Subject: [PATCH] 评论 --- framework/src/main/resources/mapper/lmk/PrizeRecordMapper.xml | 100 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 98 insertions(+), 2 deletions(-) diff --git a/framework/src/main/resources/mapper/lmk/PrizeRecordMapper.xml b/framework/src/main/resources/mapper/lmk/PrizeRecordMapper.xml index 31aed99..c8058e1 100644 --- a/framework/src/main/resources/mapper/lmk/PrizeRecordMapper.xml +++ b/framework/src/main/resources/mapper/lmk/PrizeRecordMapper.xml @@ -16,6 +16,8 @@ <result column="prize_img" property="prizeImg" /> <result column="prize_num_id" property="prizeNumId" /> <result column="activity_prize_ref_id" property="activityPrizeRefId" /> + <result column="distribute_status" property="distributeStatus" /> + <result column="distribute_status" property="distributeStatus"/> </resultMap> @@ -37,7 +39,8 @@ LPR.prize_img, LPR.prize_num_id, LPR.activity_prize_ref_id, - LPR.id + LPR.id, + LPR.distribute_status FROM lmk_prize_record LPR WHERE @@ -58,11 +61,104 @@ LPR.prize_img, LPR.prize_num_id, LPR.activity_prize_ref_id, + LPR.distribute_status, + LPR.create_time, LPR.id FROM lmk_prize_record LPR WHERE LPR.delete_flag = 0 + <if test="query.nickName != null and query.nickName !=''"> + AND LPR.nick_name like CONCAT('%',#{query.nickName},'%') + </if> + <if test="query.activityName != null and query.activityName !=''"> + AND LPR.prize_activity_name like CONCAT('%',#{query.activityName},'%') + </if> + <if test="query.prizeStatus != null and query.prizeStatus !=''"> + AND LPR.prize_status = #{query.prizeStatus} + </if> + <if test="query.distributeStatus != null and query.distributeStatus !=''"> + AND LPR.distribute_status = #{query.distributeStatus} + </if> + <if test="query.startTime != null">AND LPR.create_time >= #{query.startTime}</if> + <if test="query.endTime != null">AND LPR.create_time <= #{query.endTime}</if> </select> - + <select id="getByUserIdPage" resultMap="BaseResultMap"> + SELECT + LPR.user_id, + LPR.nick_name, + LPR.prize_activity_id, + LPR.prize_activity_name, + LPR.prize_activity_cover, + LPR.prize_status, + LPR.prize_content, + LPR.prize_id, + LPR.prize_img, + LPR.prize_num_id, + LPR.activity_prize_ref_id, + LPR.distribute_status, + LPR.id, + LPR.create_time + FROM + lmk_prize_record LPR + WHERE + LPR.delete_flag = 0 + AND LPR.user_id = #{userId} + </select> + <select id="getExportData" resultMap="BaseResultMap"> + SELECT + LPR.user_id, + LPR.nick_name, + LPR.prize_activity_id, + LPR.prize_activity_name, + LPR.prize_activity_cover, + LPR.prize_status, + LPR.prize_content, + LPR.prize_id, + LPR.prize_img, + LPR.prize_num_id, + LPR.activity_prize_ref_id, + LPR.distribute_status, + LPR.create_time, + LPR.id + FROM + lmk_prize_record LPR + WHERE + LPR.delete_flag = 0 + <if test="query.nickName != null and query.nickName !=''"> + AND LPR.nick_name like CONCAT('%',#{query.nickName},'%') + </if> + <if test="query.activityName != null and query.activityName !=''"> + AND LPR.prize_activity_name like CONCAT('%',#{query.activityName},'%') + </if> + <if test="query.prizeStatus != null and query.prizeStatus !=''"> + AND LPR.prize_status = #{query.prizeStatus} + </if> + <if test="query.distributeStatus != null and query.distributeStatus !=''"> + AND LPR.distribute_status = #{query.distributeStatus} + </if> + <if test="query.startTime != null">AND LPR.create_time >= #{query.startTime}</if> + <if test="query.endTime != null">AND LPR.create_time <= #{query.endTime}</if> + </select> + <resultMap id="getPrizeRecordListByTimeMap" type="cn.lili.modules.lmk.domain.vo.PrizeRecordTimeVO"> + <result property="activityPrizeRefId" column="activity_prize_ref_id"/> + <result property="prizeActivityId" column="prize_activity_id"/> + <result property="total" column="total"/> + </resultMap> + <select id="getPrizeRecordListByTime" resultMap="getPrizeRecordListByTimeMap"> + SELECT + activity_prize_ref_id, + prize_activity_id, + count(*) total + FROM + lmk_prize_record + WHERE + prize_activity_id = #{query.recordActivityId} + AND delete_flag = 0 + AND create_time BETWEEN #{query.startTime} + AND #{query.endTime} + GROUP BY + activity_prize_ref_id, + prize_activity_id; + </select> </mapper> -- Gitblit v1.8.0