|
@@ -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);
|