|
|
@ -409,7 +409,7 @@ |
|
|
|
LEFT JOIN (SELECT a.sku_id,a.image from cere_sku_name a,cere_product_sku b where a.sku_id=b.sku_id LIMIT 1) h ON b.sku_id=h.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) x ON a.product_id=x.product_id |
|
|
|
where a.shelve_state=1 and d.state=1 |
|
|
|
where d.state=1 |
|
|
|
<if test="search!=null and search!=''"> |
|
|
|
and (d.shop_name like concat('%',#{search},'%') OR |
|
|
|
a.product_id like concat('%',#{search},'%') OR |
|
|
@ -423,7 +423,10 @@ |
|
|
|
OR a.classify_business_id=#{classifyId} OR cpcb.classify_level_hierarchy like concat('%/',#{classifyId},'%')) |
|
|
|
</if> |
|
|
|
<if test="project!=null and project!='' and project!=0"> |
|
|
|
AND d.business_id=#{project} |
|
|
|
and d.business_id=#{project} and a.shelve_state=1 |
|
|
|
</if> |
|
|
|
<if test="project==0"> |
|
|
|
AND a.plat_shelve_state=1 |
|
|
|
</if> |
|
|
|
<if test="ids!=null and ids.size()>0"> |
|
|
|
and a.product_id in ( |
|
|
|