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

Merge pull request !159 from OceansDeep/feature/pg
This commit is contained in:
OceansDeep 2022-05-18 14:02:16 +00:00 committed by Gitee
commit db75aa1cab
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

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()) {