|
|
@@ -30,7 +30,7 @@
|
|
|
when cu.status = 'unused' then 0
|
|
|
end) as orderby
|
|
|
from `coupon_user` cu
|
|
|
- left join `coupon` cp on cp.id = cu.coupon_id and cp.deleted and cp.is_available
|
|
|
+ left join `coupon` cp on cp.id = cu.coupon_id and cp.deleted and cp.is_manul_available
|
|
|
left join `coupon_active` ca on ca.id = cu.coupon_active_id
|
|
|
left join `coupon_sku` ck on ck.coupon_id = cp.id
|
|
|
<if test="goodsId != null">
|
|
|
@@ -64,7 +64,7 @@
|
|
|
cp.reduce_condition,
|
|
|
cp.type
|
|
|
from `coupon_user` cu
|
|
|
- left join `coupon` cp on cp.id = cu.coupon_id and cp.deleted and cp.is_available
|
|
|
+ left join `coupon` cp on cp.id = cu.coupon_id and cp.deleted and cp.is_manul_available
|
|
|
left join `coupon_sku` ck on ck.coupon_id = cp.id
|
|
|
left join `coupon_active` ca on ca.id = cu.coupon_active_id
|
|
|
where
|
|
|
@@ -125,7 +125,7 @@
|
|
|
if(c.is_valid_time is true and c.valid_end_time < now(), false, true) as flag
|
|
|
from coupon_active ca
|
|
|
left join coupon c
|
|
|
- on c.id = ca.coupon_id and c.deleted and c.is_available
|
|
|
+ on c.id = ca.coupon_id and c.deleted and c.is_manul_available
|
|
|
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
|
|
|
@@ -171,7 +171,7 @@
|
|
|
when cu.status = 'unused' then 0
|
|
|
end) as orderby
|
|
|
from `coupon_user` cu
|
|
|
- left join `coupon` c on c.id = cu.coupon_id and c.deleted and c.is_available
|
|
|
+ left join `coupon` c on c.id = cu.coupon_id and c.deleted and c.is_manul_available
|
|
|
left join `coupon_active` ca on ca.id = cu.coupon_active_id
|
|
|
where cu.user_id = #{userId}
|
|
|
<if test="couponId !=null">
|
|
|
@@ -344,6 +344,6 @@
|
|
|
and valid_end_time > #{now}) cu
|
|
|
inner join coupon c on c.id = cu.coupon_id
|
|
|
where c.deleted
|
|
|
- and c.is_available
|
|
|
+ and c.is_manul_available
|
|
|
</select>
|
|
|
</mapper>
|