Browse Source

商户注券->注券列表,有效期过滤

release_toaliyun_real
Burce 6 years ago
parent
commit
2c089f37f0
1 changed files with 15 additions and 12 deletions
  1. +15
    -12
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml

+ 15
- 12
mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml View File

@@ -32,7 +32,7 @@
else
'[多商户通用]'
end) as merchant_name,
c.remain_inventory, c.use_limit_quantity, c.inventory, c.valid_start_date, c.valid_end_date,cs.send_sms
c.remain_inventory, c.use_limit_quantity, c.inventory, c.valid_start_date, c.valid_end_date,c.valid_type,cs.send_sms
</sql>

<sql id="dynamicWhereConditions">
@@ -109,17 +109,20 @@
<include refid="allColumns"/>
from wx_coupon_send cs left join wx_coupon c on c.id = cs.coupon_id
<include refid="dynamicWhereConditions"/>) as tt
where 1=1
<choose>
<when test="expired == 0">
and <![CDATA[ tt.valid_end_date >= now() ]]>
</when>
<when test="expired == 1">
and <![CDATA[ tt.valid_end_date < now() ]]>
</when>
<otherwise>
</otherwise>
</choose>
where
(tt.valid_type=1
<choose>
<when test="expired == 0">
and <![CDATA[ tt.valid_end_date >= now() ]]>
</when>
<when test="expired == 1">
and <![CDATA[ tt.valid_end_date < now() ]]>
</when>
<otherwise>
</otherwise>
</choose>
)
or tt.valid_type=2
</select>

<update id="updateStatusByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel">


Loading…
Cancel
Save