|
@@ -56,7 +56,6 @@
|
|
|
and now() > cp.display_time
|
|
|
and now() < cp.obtain_end_time
|
|
|
and if(uc.transfer_type = 1 and uc.left_share_times<1,0,1)
|
|
|
- and cp.company_wechat_id = #{companyWechatId}
|
|
|
group by cp.coupon_id
|
|
|
ORDER BY cp.create_time Desc)
|
|
|
UNION
|
|
@@ -70,7 +69,6 @@
|
|
|
and (now() < cp.obtain_start_time OR now() > cp.obtain_end_time)
|
|
|
and now() > cp.display_time
|
|
|
and now() < cp.obtain_end_time
|
|
|
- and cp.company_wechat_id = #{companyWechatId}
|
|
|
group by cp.coupon_id)
|
|
|
UNION
|
|
|
(SELECT cp.*,
|
|
@@ -84,7 +82,6 @@
|
|
|
and now() BETWEEN cp.obtain_start_time AND cp.obtain_end_time
|
|
|
AND now() > cp.display_time
|
|
|
and now() < cp.obtain_end_time
|
|
|
- and cp.company_wechat_id = #{companyWechatId}
|
|
|
group by cp.coupon_id
|
|
|
having count(if(s.user_id = #{userId}, s.user_id, null)) < cp.receive_limit_count
|
|
|
or cp.receive_limit_count = 0)
|