商品同步bug

This commit is contained in:
Tankaikai 2025-04-12 14:36:06 +08:00
parent ad803c859e
commit fda1d5f9a5
1 changed files with 1 additions and 1 deletions

View File

@ -245,6 +245,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
entity.setIsDel(DeleteEnum.NORMAL.value());
entity.setShopId(shopId);
super.save(entity);
dto.setId(entity.getId());
List<ProdSkuDTO> skuList = dto.getSkuList();
if (CollUtil.isNotEmpty(skuList)) {
List<ProdSku> prodSkuList = new ArrayList<>();
@ -278,7 +279,6 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
flow.setInOutType(InOutTypeEnum.IN.value());
flow.setInOutItem(InOutItemEnum.WIN_IN.value());
productStockFlowService.saveFlow(flow);
dto.setId(entity.getId());
}
@Override