|
|
@@ -35,6 +35,7 @@
|
|
|
and cu.status != 'used'
|
|
|
where cu.user_id = #{userId}
|
|
|
and cu.channel != 'exCode'
|
|
|
+ and cu.valid_start_time > now()
|
|
|
<if test="couponId == null">
|
|
|
order by isAvailable desc
|
|
|
</if>
|
|
|
@@ -101,6 +102,7 @@
|
|
|
left join coupon_user cu on cu.coupon_id = c.id and cu.user_id = #{userId}
|
|
|
where ca.deleted is true
|
|
|
and c.deleted is true
|
|
|
+ and cu.id is null
|
|
|
and ca.expiry_status != 0
|
|
|
and ca.`status` != 0
|
|
|
) s
|