商品删除则删除相关促销商品

This commit is contained in:
Chopper
2022-09-06 19:22:34 +08:00
parent b61cfe8b6b
commit 90a2ec9719
5 changed files with 27 additions and 1 deletions

View File

@@ -205,6 +205,8 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
for (String goodsId : JSONUtil.toList(goodsIdsJsonStr, String.class)) {
goodsIndexService.deleteIndex(MapUtil.builder(new HashMap<String, Object>()).put("goodsId", goodsId).build());
}
promotionService.removeByGoodsIds(goodsIdsJsonStr);
} catch (Exception e) {
log.error("删除商品索引事件执行异常,商品信息: " + new String(messageExt.getBody()), e);
}