|
|
@@ -1405,11 +1405,11 @@ public class ProductServiceImpl implements ProductService {
|
|
|
String sql = null;
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
if ((prIdLong != null) && (prIdLong.size() != 0)) {
|
|
|
- sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled, 0) = 1 and p.pr_id in (:ids) and p.pr_id not in (select DISTINCT go_productid from trade$goods where go_productid is not null and go_status != 612);";
|
|
|
+ sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled, 0) = 1 and p.pr_id in (:ids) and p.pr_id not in (select DISTINCT go_productid from trade$goods where go_productid is not null);";
|
|
|
map.put("ids", prIdLong);
|
|
|
} else {
|
|
|
// 暂时不会进入当前循环,速度比较低
|
|
|
- sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled,0) = 1 and if(p.pr_standard, 0) = (:standard) and p.pr_enuu = (:enuu) and p.pr_id not in (select DISTINCT go_productid from trade$goods where go_productid is not null and go_status != 612);";
|
|
|
+ sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled,0) = 1 and ifnull(p.pr_standard, 0) = (:standard) and p.pr_enuu = (:enuu) and p.pr_id not in (select DISTINCT go_productid from trade$goods where go_productid is not null);";
|
|
|
map.put("enuu", uu);
|
|
|
map.put("standard", standard);
|
|
|
}
|