|
|
@@ -1792,6 +1792,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
}
|
|
|
Map<String, Object> map = new HashedMap();
|
|
|
List<Product> products = new ArrayList<>();
|
|
|
+ List<ProductPrivate> productPrivates = new ArrayList<>();
|
|
|
Set<Long> prIds = new HashSet<>();
|
|
|
Set<Long> reIds = new HashSet<>();
|
|
|
Map<String, List<PCBPropertyValue>> propertyMap = new HashedMap();
|
|
|
@@ -1856,13 +1857,20 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- List<Product> products1 = new ArrayList<>();
|
|
|
if (products.size() != 0) {
|
|
|
List<Product> productes = productDao.save(products);
|
|
|
- products1.addAll(productes);
|
|
|
+ for (Product producte : productes) {
|
|
|
+ ProductPrivate productPrivate = new ProductPrivate();
|
|
|
+ productPrivate.setB2cEnabled(IntegerConstant.YES_SHORT);
|
|
|
+ productPrivate.setPrId(producte.getId());
|
|
|
+ productPrivate.setBatchCount(IntegerConstant.NO_SHORT);
|
|
|
+ productPrivates.add(productPrivate);
|
|
|
+
|
|
|
+ prIds.add(producte.getId());
|
|
|
+ }
|
|
|
}
|
|
|
- for (Product product : products1) {
|
|
|
- prIds.add(product.getId());
|
|
|
+ if (CollectionUtils.isNotEmpty(productPrivates)) {
|
|
|
+ productPrivateService.saveProductPrivate(productPrivates);
|
|
|
}
|
|
|
if (reIds.size() > 0) {
|
|
|
map.put("reIds", reIds);
|