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

This commit is contained in:
paulGao 2022-05-31 17:01:01 +08:00
parent 8b23c623d1
commit 1a6ec578de

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索引移除