Browse Source

促销方案查询商品重复修复

hu 3 years ago
parent
commit
71467a787d

+ 1 - 1
src/custom/restcontroller/sale/promotion/SQL/促销方案商品查询.sql

@@ -21,5 +21,5 @@ FROM
 	sa_promotion_items t1
 	left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid
 	left join plm_unit t3 on t2.unitid=t3.unitid and t2.siteid=t3.siteid
-	 LEFT JOIN sa_promotion_itemprice t5 ON t5.itemid = t1.itemid and t5.siteid = t1.siteid
+	 LEFT JOIN sa_promotion_itemprice t5 ON t5.itemid = t1.itemid and t5.siteid = t1.siteid and  t1.sa_promotionid=t5.sa_promotionid
 	where t1.siteid=$siteid$ and t1.sa_promotionid=$sa_promotionid$  and $where$  and t5.pricegrade = (SELECT grade FROM sys_enterprise WHERE sys_enterpriseid = $sys_enterpriseid$ and siteid = $siteid$ )