记得上下班打卡 | git大法好,push需谨慎

Commit 06cd00e8 authored by wanglele's avatar wanglele

批量空投

parent 101f6080
...@@ -82,47 +82,51 @@ ...@@ -82,47 +82,51 @@
select select
DISTINCT DISTINCT
gnec.code,gnec.code_id,gnec.sku_id,gnec.box_sku_id,gnec.activity_id,gnec.state,gnec.redeem_uid,gnec.redeem_at,gnec.admin_uid,gnec.created_at gnec.code,gnec.code_id,gnec.sku_id,gnec.box_sku_id,gnec.activity_id,gnec.state,gnec.redeem_uid,gnec.redeem_at,gnec.admin_uid,gnec.created_at
from goblin_nft_ex_code gnec inner join goblin_nft_ex_sku gnes on gnec.sku_id = gnes.sku_id and gnes.activity_id = gnec.activity_id from goblin_nft_ex_code gnec inner join goblin_nft_ex_sku gnes on gnec.sku_id = gnes.sku_id and gnes.activity_id
<if test="code != null and code != ''"> = gnec.activity_id
and gnec.code = #{code,jdbcType=VARCHAR} <where>
</if> <if test="code != null and code != ''">
<if test="activityId != null and activityId != ''"> and gnec.code = #{code,jdbcType=VARCHAR}
and gnec.activity_id = #{activityId,jdbcType=VARCHAR} </if>
</if> <if test="activityId != null and activityId != ''">
<if test="state != null"> and gnec.activity_id = #{activityId,jdbcType=VARCHAR}
<choose> </if>
<when test="state == 1"> <if test="state != null">
and (now() BETWEEN gnes.ex_start_time and gnes.ex_stop_time) and <choose>
gnec.state =1 <when test="state == 1">
</when> and (now() BETWEEN gnes.ex_start_time and gnes.ex_stop_time) and
<when test="state == 2"> gnec.state =1
and gnec.state = 2 </when>
</when> <when test="state == 2">
<when test="state == 3"> and gnec.state = 2
and (((now() &gt; gnes.ex_stop_time) AND gnec.state = 1) || </when>
gnec.state = 3) <when test="state == 3">
</when> and (((now() &gt; gnes.ex_stop_time) AND gnec.state = 1) ||
</choose> gnec.state = 3)
</if> </when>
<if test="redeemUid != null and redeemUid != ''"> </choose>
and gnec.redeem_uid = #{redeemUid,jdbcType=VARCHAR} </if>
</if> <if test="redeemUid != null and redeemUid != ''">
<if test="skuId != null and skuId != ''"> and gnec.redeem_uid = #{redeemUid,jdbcType=VARCHAR}
and gnec.sku_id in </if>
<foreach collection="skuId.split(',')" item="sId" open="(" separator="," close=")"> <if test="skuId != null and skuId != ''">
#{sId,jdbcType=VARCHAR} and gnec.sku_id in
</foreach> <foreach collection="skuId.split(',')" item="sId" open="(" separator="," close=")">
</if> #{sId,jdbcType=VARCHAR}
<if test="isDrivi != null"> </foreach>
<choose> </if>
<when test="isDrivi == 1"> <if test="isDrivi != null">
and gnec.admin_uid = '' <choose>
</when> <when test="isDrivi == 1">
<when test="isDrivi == 2"> and gnec.admin_uid = ''
and gnec.admin_uid != '' </when>
</when> <when test="isDrivi == 2">
</choose> and gnec.admin_uid != ''
</if> </when>
</choose>
</if>
</where>
</select> </select>
<select id="selectCodeAvailableByActivityId" resultMap="BeseResult"> <select id="selectCodeAvailableByActivityId" resultMap="BeseResult">
...@@ -148,46 +152,49 @@ ...@@ -148,46 +152,49 @@
from goblin_nft_ex_code gnec inner join goblin_nft_ex_sku gnes from goblin_nft_ex_code gnec inner join goblin_nft_ex_sku gnes
on on
gnec.sku_id = gnes.sku_id and gnes.activity_id = gnec.activity_id gnec.sku_id = gnes.sku_id and gnes.activity_id = gnec.activity_id
<if test="code != null and code != ''"> <where>
and gnec.code = #{code,jdbcType=VARCHAR} <if test="code != null and code != ''">
</if> and gnec.code = #{code,jdbcType=VARCHAR}
<if test="activityId != null and activityId != ''"> </if>
and gnec.activity_id = #{activityId,jdbcType=VARCHAR} <if test="activityId != null and activityId != ''">
</if> and gnec.activity_id = #{activityId,jdbcType=VARCHAR}
<if test="state != null"> </if>
<choose> <if test="state != null">
<when test="state == 1"> <choose>
and gnec.sku_id = gnes.sku_id and (now() BETWEEN gnes.ex_start_time and gnes.ex_stop_time) and <when test="state == 1">
gnec.state =1 and gnec.sku_id = gnes.sku_id and (now() BETWEEN gnes.ex_start_time and gnes.ex_stop_time) and
</when> gnec.state =1
<when test="state == 2"> </when>
and gnec.state = 2 <when test="state == 2">
</when> and gnec.state = 2
<when test="state == 3"> </when>
and gnec.sku_id = gnes.sku_id and (((now() &gt; gnes.ex_stop_time) AND gnec.state = 1) || <when test="state == 3">
gnec.state = 3) and gnec.sku_id = gnes.sku_id and (((now() &gt; gnes.ex_stop_time) AND gnec.state = 1) ||
</when> gnec.state = 3)
</choose> </when>
</if> </choose>
<if test="redeemUid != null and redeemUid != ''"> </if>
and gnec.redeem_uid = #{redeemUid,jdbcType=VARCHAR} <if test="redeemUid != null and redeemUid != ''">
</if> and gnec.redeem_uid = #{redeemUid,jdbcType=VARCHAR}
<if test="skuId != null and skuId != ''"> </if>
and gnec.sku_id in <if test="skuId != null and skuId != ''">
<foreach collection="skuId.split(',')" item="sId" open="(" separator="," close=")"> and gnec.sku_id in
#{sId,jdbcType=VARCHAR} <foreach collection="skuId.split(',')" item="sId" open="(" separator="," close=")">
</foreach> #{sId,jdbcType=VARCHAR}
</if> </foreach>
<if test="isDrivi != null"> </if>
<choose> <if test="isDrivi != null">
<when test="isDrivi == 1"> <choose>
and gnec.admin_uid = '' <when test="isDrivi == 1">
</when> and gnec.admin_uid = ''
<when test="isDrivi == 2"> </when>
and gnec.admin_uid != '' <when test="isDrivi == 2">
</when> and gnec.admin_uid != ''
</choose> </when>
</if> </choose>
</if>
</where>
</select> </select>
<select id="selectByActivityIds" resultMap="BeseResult"> <select id="selectByActivityIds" resultMap="BeseResult">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment