|
|
@ -237,10 +237,10 @@ |
|
|
|
<select id="findNoBuy" parameterType="com.shop.cereshop.business.param.tool.CrowdCondition" |
|
|
|
resultType="java.lang.Long"> |
|
|
|
SELECT a.buyer_user_id from cere_buyer_user a |
|
|
|
LEFT JOIN (SELECT COUNT(*) count,buyer_user_id,shop_id from cere_shop_order where DATE_SUB(CURDATE(), INTERVAL |
|
|
|
LEFT JOIN (SELECT COUNT(*) count,buyer_user_id,shop_id,project from cere_shop_order where DATE_SUB(CURDATE(), INTERVAL |
|
|
|
#{number} DAY) <= date(payment_time) |
|
|
|
GROUP BY buyer_user_id) b ON a.buyer_user_id=b.buyer_user_id |
|
|
|
where b.shop_id=#{shopId} and b.count=0 |
|
|
|
where b.project=#{shopId} and b.count=0 and a.project=#{shopId} |
|
|
|
<if test="ids!=null and ids.size()>0"> |
|
|
|
and a.buyer_user_id in ( |
|
|
|
<foreach collection="ids" item="id" index="index" separator=","> |
|
|
@ -253,10 +253,10 @@ |
|
|
|
<select id="findNoOrder" parameterType="com.shop.cereshop.business.param.tool.CrowdCondition" |
|
|
|
resultType="java.lang.Long"> |
|
|
|
SELECT a.buyer_user_id from cere_buyer_user a |
|
|
|
LEFT JOIN (SELECT COUNT(*) count,buyer_user_id,shop_id from cere_shop_order where DATE_SUB(CURDATE(), INTERVAL |
|
|
|
LEFT JOIN (SELECT COUNT(*) count,buyer_user_id,shop_id,project from cere_shop_order where DATE_SUB(CURDATE(), INTERVAL |
|
|
|
#{number} DAY) <= date(create_time) |
|
|
|
GROUP BY buyer_user_id) b ON a.buyer_user_id=b.buyer_user_id |
|
|
|
where b.shop_id=#{shopId} and b.count=0 |
|
|
|
where b.project=#{shopId} and b.count=0 and a.project=#{shopId} |
|
|
|
<if test="ids!=null and ids.size()>0"> |
|
|
|
and a.buyer_user_id in ( |
|
|
|
<foreach collection="ids" item="id" index="index" separator=","> |
|
|
@ -272,7 +272,7 @@ |
|
|
|
LEFT JOIN (SELECT COUNT(*) count,buyer_user_id from cere_shop_visit where DATE_SUB(CURDATE(), INTERVAL #{number} |
|
|
|
DAY) <= date(visit_time) |
|
|
|
GROUP BY buyer_user_id) b ON a.buyer_user_id=b.buyer_user_id |
|
|
|
where b.count=0 |
|
|
|
where a.project=#{shopId} and b.count=0 |
|
|
|
<if test="ids!=null and ids.size()>0"> |
|
|
|
and a.buyer_user_id in ( |
|
|
|
<foreach collection="ids" item="id" index="index" separator=","> |
|
|
|