From 640ff18d2d7f4be02ddb7f8f75e899f05545eb98 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 05 二月 2024 11:56:52 +0800 Subject: [PATCH] 更新bug修改 --- cloud-server-activity/src/main/resources/mapper/IntroduceRewardsMapper.xml | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/cloud-server-activity/src/main/resources/mapper/IntroduceRewardsMapper.xml b/cloud-server-activity/src/main/resources/mapper/IntroduceRewardsMapper.xml index 95e3ae0..510e09a 100644 --- a/cloud-server-activity/src/main/resources/mapper/IntroduceRewardsMapper.xml +++ b/cloud-server-activity/src/main/resources/mapper/IntroduceRewardsMapper.xml @@ -15,4 +15,36 @@ </if> </where> </update> + <select id="listAll" resultType="com.dsh.activity.model.IntroduceVO"> + select t1.id,CONCAT(t1.province,t1.city) as provinceAndCity,t1.startTime,t1.endTime, + t1.giveClass,t1.state,t1.insertTime from t_introduce_rewards t1 + <where> + <if test="query.city!=null and query.city!= ''"> + and t1.cityCode = #{query.city} + </if> + <if test="query.province!=null and query.province!= ''"> + and t1.provinceCode = #{query.province} + </if> + <if test="query.activityState!=null and query.activityState!= ''"> + AND t1.state = #{query.activityState} + </if> + <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> + and t1.startTime between #{sTime} and #{eTime} + </if> + <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''"> + and t1.endTime between #{sTime} and #{eTime} + </if> + <choose> + <when test="query.state == 1"> + and NOW() between t1.startTime and t1.endTime + </when> + <when test="query.state == 2"> + and t1.endTime <= NOW() + </when> + <when test="query.state == 3"> + and t1.startTime >= NOW() + </when> + </choose> + </where> + </select> </mapper> -- Gitblit v1.7.1