|
|
@ -830,7 +830,13 @@ |
|
|
|
LEFT JOIN (SELECT IF(SUM(number) IS NULL,0,SUM(number)) number,sku_id,order_id from cere_order_product GROUP BY sku_id) f ON b.sku_id=f.sku_id |
|
|
|
LEFT JOIN (SELECT COUNT(a.buyer_user_id) users,a.product_id FROM (SELECT b.buyer_user_id,a.product_id FROM cere_order_product a,cere_shop_order b |
|
|
|
where a.order_id=b.order_id and b.state in (2,3,4) GROUP BY a.product_id,b.buyer_user_id) a GROUP BY a.product_id) g ON a.product_id=g.product_id |
|
|
|
where d.state=1 and a.shelve_state=1 |
|
|
|
where d.state=1 |
|
|
|
<if test="project == 0"> |
|
|
|
and a.plat_shelve_state=1 |
|
|
|
</if> |
|
|
|
<if test="project!=0 and project != ''"> |
|
|
|
and a.shelve_state=1 |
|
|
|
</if> |
|
|
|
<if test="classifyId!=null"> |
|
|
|
and (a.classify_id=#{classifyId} OR a.classify_business_id=#{classifyId}) |
|
|
|
</if> |
|
|
|