Merge remote-tracking branch 'origin/master'

This commit is contained in:
HH 2023-02-18 00:24:32 +08:00
commit b0477d02ca
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());