From 9666caad786d890ace2df4594e71cee47bb489b9 Mon Sep 17 00:00:00 2001 From: Administrator <Administrator@S0ZHK00LKCA6OYY> Date: 星期五, 23 十一月 2018 09:22:20 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml index ebc868e..dc653e4 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml @@ -129,9 +129,10 @@ <update id="effectThreeSale" parameterType="java.lang.Long"> - update - yeshi_ec_threeSale t - set t.state=1 where t.state=0 and t.worker_id=#{0} AND (t.expire = 0 OR t.expire IS NULL) + update yeshi_ec_threeSale t set t.state=1, + t.succeedTime = <![CDATA[UNIX_TIMESTAMP(CURRENT_TIMESTAMP()) * 1000]]>, + t.updateTime = <![CDATA[UNIX_TIMESTAMP(CURRENT_TIMESTAMP()) * 1000]]> + where t.state=0 and t.worker_id=#{0} AND (t.expire = 0 OR t.expire IS NULL) </update> <!-- 鏌ヨ涓�搴﹂槦鍛橀泦鍚� --> @@ -197,7 +198,7 @@ <update id="updateExpire" parameterType="java.lang.Long"> update yeshi_ec_threeSale t - set t.expire = 1 + set t.expire = 1, t.updateTime = <![CDATA[UNIX_TIMESTAMP(CURRENT_TIMESTAMP()) * 1000]]> where t.`id` IN <foreach item="item" collection="list" open="(" separator="," close=")">#{item}</foreach> </update> @@ -343,6 +344,7 @@ ON ts.`boss_id` = ff.`tf_boss_id` AND ts.`worker_id` = ff.`tf_worker_id` WHERE ts.`boss_id` = #{uid} ORDER BY ts.state DESC, ts.expire, ts.succeedTime DESC + LIMIT ${start},${count} </select> <select id="countFirstTeam" resultType="java.lang.Long"> @@ -382,4 +384,14 @@ select <include refid="Base_Column_List" /> from yeshi_ec_threeSale where state = 1 and worker_id=#{uid} </select> + + + <select id="listbyIdAndBossId" resultMap="BaseResultMap"> + SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_threeSale + WHERE id = #{uid} AND boss_id=#{uid} + <if test="expire != null and expire == 1"> + AND `expire` = 1 <!-- 澶辨晥 --> + </if> + </select> + </mapper> -- Gitblit v1.8.0