优化修改sku时,如存在sku则不新增

This commit is contained in:
paulGao 2022-05-18 22:00:42 +08:00
parent 31fb55635e
commit f5718b4062

View File

@ -179,7 +179,7 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> i
this.clearCache(sku.getId());
}
}
this.updateBatchById(newSkuList);
this.saveOrUpdateBatch(newSkuList);
}
this.updateStock(newSkuList);
if (GoodsAuthEnum.PASS.name().equals(goods.getAuthFlag()) && !newSkuList.isEmpty()) {