|
@@ -16,16 +16,16 @@
|
|
|
t2.bar_code
|
|
|
FROM
|
|
|
goods t1
|
|
|
- join goods_company t4 on t1.goods_id = t4.goods_id
|
|
|
left join goods_spec t2 on t1.goods_id = t2.goods_id and t2.del = 0
|
|
|
left join goods_category t3 on t3.category_id = t1.category_id
|
|
|
WHERE
|
|
|
t1.del = 0
|
|
|
- <if test='companyWechatId != null and companyWechatId.size > 0' >
|
|
|
- AND t4.company_id in
|
|
|
- <foreach collection="companyWechatId" open="(" close=")" item="item" separator=",">
|
|
|
- #{item}
|
|
|
+ <if test=' companyWechatId != null and companyWechatId.size > 0' >
|
|
|
+ AND t1.goods_id in (select b.goods_id from goods_company b where b.company_id in
|
|
|
+ <foreach collection="companyWechatId" open="(" close=")" item="companyWechatId" separator=",">
|
|
|
+ #{companyWechatId}
|
|
|
</foreach>
|
|
|
+ )
|
|
|
</if>
|
|
|
<if test='goodsTypes != null and goodsTypes.size > 0' >
|
|
|
AND t1.goods_type in
|