| | |
| | | |
| | | |
| | | <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> |
| | | |
| | | <!-- 查询一度队员集合 --> |
| | |
| | | <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> |
| | |
| | | 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"> |
| | |
| | | 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> |