消费者执行异常问题处理:包含系统自动评价问题,和自动新增秒杀活动问题

This commit is contained in:
Chopper
2022-02-16 17:42:12 +08:00
parent c5da640432
commit b32bf41443
2 changed files with 18 additions and 6 deletions

View File

@@ -44,10 +44,18 @@ public class PromotionEverydayExecute implements EveryDayExecute {
*/
@Override
public void execute() {
//清除所以商品索引的无效促销活动
this.esGoodsIndexService.cleanInvalidPromotion();
//定时创建活动
addSeckill();
try {
//清除所有商品索引的无效促销活动
this.esGoodsIndexService.cleanInvalidPromotion();
} catch (Exception e) {
log.error("清楚商品索引中无效促销异常", e);
}
try {
//定时创建活动
addSeckill();
} catch (Exception e) {
log.error("秒杀活动添加异常", e);
}
}