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

Commit 06cd00e8 authored by wanglele's avatar wanglele

批量空投

parent 101f6080
......@@ -82,47 +82,51 @@
select
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
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
<if test="code != null and code != ''">
and gnec.code = #{code,jdbcType=VARCHAR}
</if>
<if test="activityId != null and activityId != ''">
and gnec.activity_id = #{activityId,jdbcType=VARCHAR}
</if>
<if test="state != null">
<choose>
<when test="state == 1">
and (now() BETWEEN gnes.ex_start_time and gnes.ex_stop_time) and
gnec.state =1
</when>
<when test="state == 2">
and gnec.state = 2
</when>
<when test="state == 3">
and (((now() &gt; gnes.ex_stop_time) AND gnec.state = 1) ||
gnec.state = 3)
</when>
</choose>
</if>
<if test="redeemUid != null and redeemUid != ''">
and gnec.redeem_uid = #{redeemUid,jdbcType=VARCHAR}
</if>
<if test="skuId != null and skuId != ''">
and gnec.sku_id in
<foreach collection="skuId.split(',')" item="sId" open="(" separator="," close=")">
#{sId,jdbcType=VARCHAR}
</foreach>
</if>
<if test="isDrivi != null">
<choose>
<when test="isDrivi == 1">
and gnec.admin_uid = ''
</when>
<when test="isDrivi == 2">
and gnec.admin_uid != ''
</when>
</choose>
</if>
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
<where>
<if test="code != null and code != ''">
and gnec.code = #{code,jdbcType=VARCHAR}
</if>
<if test="activityId != null and activityId != ''">
and gnec.activity_id = #{activityId,jdbcType=VARCHAR}
</if>
<if test="state != null">
<choose>
<when test="state == 1">
and (now() BETWEEN gnes.ex_start_time and gnes.ex_stop_time) and
gnec.state =1
</when>
<when test="state == 2">
and gnec.state = 2
</when>
<when test="state == 3">
and (((now() &gt; gnes.ex_stop_time) AND gnec.state = 1) ||
gnec.state = 3)
</when>
</choose>
</if>
<if test="redeemUid != null and redeemUid != ''">
and gnec.redeem_uid = #{redeemUid,jdbcType=VARCHAR}
</if>
<if test="skuId != null and skuId != ''">
and gnec.sku_id in
<foreach collection="skuId.split(',')" item="sId" open="(" separator="," close=")">
#{sId,jdbcType=VARCHAR}
</foreach>
</if>
<if test="isDrivi != null">
<choose>
<when test="isDrivi == 1">
and gnec.admin_uid = ''
</when>
<when test="isDrivi == 2">
and gnec.admin_uid != ''
</when>
</choose>
</if>
</where>
</select>
<select id="selectCodeAvailableByActivityId" resultMap="BeseResult">
......@@ -148,46 +152,49 @@
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
<if test="code != null and code != ''">
and gnec.code = #{code,jdbcType=VARCHAR}
</if>
<if test="activityId != null and activityId != ''">
and gnec.activity_id = #{activityId,jdbcType=VARCHAR}
</if>
<if test="state != null">
<choose>
<when test="state == 1">
and gnec.sku_id = gnes.sku_id and (now() BETWEEN gnes.ex_start_time and gnes.ex_stop_time) and
gnec.state =1
</when>
<when test="state == 2">
and gnec.state = 2
</when>
<when test="state == 3">
and gnec.sku_id = gnes.sku_id and (((now() &gt; gnes.ex_stop_time) AND gnec.state = 1) ||
gnec.state = 3)
</when>
</choose>
</if>
<if test="redeemUid != null and redeemUid != ''">
and gnec.redeem_uid = #{redeemUid,jdbcType=VARCHAR}
</if>
<if test="skuId != null and skuId != ''">
and gnec.sku_id in
<foreach collection="skuId.split(',')" item="sId" open="(" separator="," close=")">
#{sId,jdbcType=VARCHAR}
</foreach>
</if>
<if test="isDrivi != null">
<choose>
<when test="isDrivi == 1">
and gnec.admin_uid = ''
</when>
<when test="isDrivi == 2">
and gnec.admin_uid != ''
</when>
</choose>
</if>
<where>
<if test="code != null and code != ''">
and gnec.code = #{code,jdbcType=VARCHAR}
</if>
<if test="activityId != null and activityId != ''">
and gnec.activity_id = #{activityId,jdbcType=VARCHAR}
</if>
<if test="state != null">
<choose>
<when test="state == 1">
and gnec.sku_id = gnes.sku_id and (now() BETWEEN gnes.ex_start_time and gnes.ex_stop_time) and
gnec.state =1
</when>
<when test="state == 2">
and gnec.state = 2
</when>
<when test="state == 3">
and gnec.sku_id = gnes.sku_id and (((now() &gt; gnes.ex_stop_time) AND gnec.state = 1) ||
gnec.state = 3)
</when>
</choose>
</if>
<if test="redeemUid != null and redeemUid != ''">
and gnec.redeem_uid = #{redeemUid,jdbcType=VARCHAR}
</if>
<if test="skuId != null and skuId != ''">
and gnec.sku_id in
<foreach collection="skuId.split(',')" item="sId" open="(" separator="," close=")">
#{sId,jdbcType=VARCHAR}
</foreach>
</if>
<if test="isDrivi != null">
<choose>
<when test="isDrivi == 1">
and gnec.admin_uid = ''
</when>
<when test="isDrivi == 2">
and gnec.admin_uid != ''
</when>
</choose>
</if>
</where>
</select>
<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