Browse Source

暂时注释保存历史库存的操作,还是在存储过程中保存

yujia 7 years ago
parent
commit
78d4b3cbbb

+ 9 - 9
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -1928,7 +1928,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
         if (CollectionUtils.isEmpty(productIds) || StringUtils.isEmpty(batchid)) {
 			return ;
 		}
-        final List<Goods> goodses = goodsService.findByBatchId(batchid);
+//        final List<Goods> goodses = goodsService.findByBatchId(batchid);
 		final Runnable afterPublishToGoodsRunnable = new Runnable() {
 			@Override
 			public void run() {
@@ -1953,14 +1953,14 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 					goodsService.updateSpecByProducts(products, goodses);
 				}
 
-                List<GoodsHistory> list = new ArrayList<>();
-                for (Goods goodse : goodses) {
-                    GoodsHistory goodsHistory = goodsHistoryService.converTGoodsHist(goodse, GoodsHistory.OperateType.Publish.getPhrase(), false);
-                    list.add(goodsHistory);
-                }
-                if (CollectionUtils.isNotEmpty(list)) {
-                    commonDao.save(list, GoodsHistory.class);
-                }
+//                List<GoodsHistory> list = new ArrayList<>();
+//                for (Goods goodse : goodses) {
+//                    GoodsHistory goodsHistory = goodsHistoryService.converTGoodsHist(goodse, GoodsHistory.OperateType.Publish.getPhrase(), false);
+//                    list.add(goodsHistory);
+//                }
+//                if (CollectionUtils.isNotEmpty(list)) {
+//                    commonDao.save(list, GoodsHistory.class);
+//                }
             }
 		};
 		try {