|
|
|
@@ -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"> |
|
|
|
|