Merge branch 'ww' into test

This commit is contained in:
wangw 2024-09-28 11:21:29 +08:00
commit d785bd7fa8
1 changed files with 23 additions and 20 deletions

View File

@ -257,6 +257,8 @@ public class TbProductStockDetailServiceImpl implements TbProductStockDetailServ
List<StockCountDTO> stockCountDTOS = stockCountRepository.countStockById(orderId); List<StockCountDTO> stockCountDTOS = stockCountRepository.countStockById(orderId);
log.info("查询到订单id: {}的所有库存数据: {}", orderId, stockCountDTOS); log.info("查询到订单id: {}的所有库存数据: {}", orderId, stockCountDTOS);
stockCountDTOS.forEach(s -> { stockCountDTOS.forEach(s -> {
//客座费不统计
if (!s.getProId().toString().equals("-999")) {
if (s.getStockCount() > 0) { if (s.getStockCount() > 0) {
TbProductStockDetail productStockDetail = new TbProductStockDetail(); TbProductStockDetail productStockDetail = new TbProductStockDetail();
productStockDetail.setCreatedAt(System.currentTimeMillis()); productStockDetail.setCreatedAt(System.currentTimeMillis());
@ -278,6 +280,7 @@ public class TbProductStockDetailServiceImpl implements TbProductStockDetailServ
tbProductStockDetailRepository.save(productStockDetail); tbProductStockDetailRepository.save(productStockDetail);
} }
skutMapper.incrRealSalesNumber(s.getSkuId().intValue(), s.getStockCount()); skutMapper.incrRealSalesNumber(s.getSkuId().intValue(), s.getStockCount());
}
}); });
} }