!172 修复编辑商品时默认读取缓存中的数据

Merge pull request !172 from OceansDeep/feature/pg
This commit is contained in:
OceansDeep 2022-05-31 09:01:34 +00:00 committed by Gitee
commit 594d2f620c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -167,12 +167,7 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> i
skuList = new ArrayList<>();
for (Map<String, Object> map : goodsOperationDTO.getSkuList()) {
GoodsSku sku = null;
if (map.get("id") != null) {
sku = GoodsSkuBuilder.build(this.getGoodsSkuByIdFromCache(map.get("id").toString()), map, goodsOperationDTO);
}
if (sku == null || map.get("id") == null) {
sku = GoodsSkuBuilder.build(goods, map, goodsOperationDTO);
}
sku = GoodsSkuBuilder.build(goods, map, goodsOperationDTO);
renderGoodsSku(sku, goodsOperationDTO);
skuList.add(sku);
//如果商品状态值不对则es索引移除