校验问题

This commit is contained in:
kuang.yife 2023-02-17 13:55:43 +08:00
parent bbd5e6ae5c
commit 905533f5cc
1 changed files with 6 additions and 1 deletions

View File

@ -49,7 +49,12 @@ public class GoodsServiceImpl implements GoodsService {
// 给各组件插入商品主体id
goods.getGoodsAreaList().forEach(goodsArea -> {goodsArea.setGoodsId(goods.getGoodsId());});
goods.getGoodsImgsList().forEach(goodsImg -> {goodsImg.setGoodsId(goods.getGoodsId());});
goods.getGoodsStandardList().forEach(goodsStandard -> {goodsStandard.setGoodsId(goods.getGoodsId());});
goods.getGoodsStandardList().forEach(goodsStandard -> {
goodsStandard.setGoodsId(goods.getGoodsId());
if(goodsStandard.getExtMoney() == null){
goodsStandard.setExtMoney(BigDecimal.ZERO);
}
});
// 批量插入各组件
goodsAreaService.batchInsert(goods.getGoodsAreaList());