!113 修复商品审核和编辑商品缺失对es操作问题
Merge pull request !113 from OceansDeep/feature/pg
This commit is contained in:
commit
bbed7afdcb
@ -188,6 +188,7 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
case GOODS_AUDIT:
|
||||
Goods goods = JSONUtil.toBean(new String(messageExt.getBody()), Goods.class);
|
||||
updateGoodsNum(goods);
|
||||
updateGoodsIndex(goods);
|
||||
break;
|
||||
//删除商品
|
||||
case GOODS_DELETE:
|
||||
|
@ -54,10 +54,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 商品业务层实现
|
||||
@ -197,6 +194,9 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
||||
if (goodsOperationDTO.getGoodsGalleryList() != null && !goodsOperationDTO.getGoodsGalleryList().isEmpty()) {
|
||||
this.goodsGalleryService.add(goodsOperationDTO.getGoodsGalleryList(), goods.getId());
|
||||
}
|
||||
if (GoodsAuthEnum.TOBEAUDITED.name().equals(goods.getAuthFlag())) {
|
||||
this.deleteEsGoods(Collections.singletonList(goodsId));
|
||||
}
|
||||
cache.remove(CachePrefix.GOODS.getPrefix() + goodsId);
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> i
|
||||
this.updateBatchById(newSkuList);
|
||||
}
|
||||
this.updateStock(newSkuList);
|
||||
if (!newSkuList.isEmpty()) {
|
||||
if (GoodsAuthEnum.PASS.name().equals(goods.getAuthFlag()) && !newSkuList.isEmpty()) {
|
||||
generateEs(goods);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user