fix promotion seckill for no join goods is not autostart
This commit is contained in:
parent
ac60f27814
commit
d4c9b0f147
@ -398,11 +398,9 @@ public class PromotionServiceImpl implements PromotionService {
|
|||||||
seckill.setPromotionStatus(promotionMessage.getPromotionStatus());
|
seckill.setPromotionStatus(promotionMessage.getPromotionStatus());
|
||||||
result = this.seckillService.update(updateWrapper(promotionMessage));
|
result = this.seckillService.update(updateWrapper(promotionMessage));
|
||||||
log.info("更新限时抢购活动状态:{}", seckill);
|
log.info("更新限时抢购活动状态:{}", seckill);
|
||||||
//判断参与活动的商品是否为空,如果为空则返回
|
|
||||||
if (seckill.getSeckillApplyList() == null) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
//判断参与活动的商品是否为空
|
||||||
|
if (seckill.getSeckillApplyList() != null && !seckill.getSeckillApplyList().isEmpty()) {
|
||||||
//循环秒杀商品数据,将数据按照时间段进行存储
|
//循环秒杀商品数据,将数据按照时间段进行存储
|
||||||
for (SeckillApply seckillApply : seckill.getSeckillApplyList()) {
|
for (SeckillApply seckillApply : seckill.getSeckillApplyList()) {
|
||||||
if (seckillApply.getPromotionApplyStatus().equals(PromotionApplyStatusEnum.PASS.name())) {
|
if (seckillApply.getPromotionApplyStatus().equals(PromotionApplyStatusEnum.PASS.name())) {
|
||||||
@ -434,6 +432,8 @@ public class PromotionServiceImpl implements PromotionService {
|
|||||||
this.goodsIndexService.updateEsGoodsIndex(seckillApply.getSkuId(), seckill1, promotionTypeEnum.name() + "-" + seckillApply.getTimeLine(), seckillApply.getPrice());
|
this.goodsIndexService.updateEsGoodsIndex(seckillApply.getSkuId(), seckill1, promotionTypeEnum.name() + "-" + seckillApply.getTimeLine(), seckillApply.getPrice());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.mongoTemplate.save(seckill);
|
this.mongoTemplate.save(seckill);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user