Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 4 năm trước cách đây
mục cha
commit
47583a56dc

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/GoodsServiceImpl.java

@@ -465,7 +465,7 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods>  implement
 	}
 
 	@Override
-	@Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED)
+	@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
 	public List<SellOrder> subtractStock(List<Integer> goodsIds, AccountType accountType) {
 		if(CollectionUtils.isEmpty(goodsIds)){
 			return Collections.emptyList();
@@ -475,7 +475,7 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods>  implement
 		Map<Integer, Goods> idTempGoodsMap = tempGoodsList.stream().collect(Collectors.toMap(Goods::getId, g -> g));
 		List<GoodsProcurement> goodsProcurements = new ArrayList<>();
 		for (Integer goodsId : goodsIds) {
-			Goods tempGoods = goodsDao.get(goodsId);
+			Goods tempGoods = idTempGoodsMap.get(goodsId);
 			List<Goods> childGoods = new ArrayList<>();
 			if(StringUtils.isBlank(tempGoods.getComplementGoodsIdList())){
 				childGoods.add(tempGoods);