解决问题:关闭优惠券后,商品页面还是展示优惠券
This commit is contained in:
parent
6f1aa6e3d5
commit
9ff2f50b8f
@ -156,8 +156,7 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
|
||||
couponVO.setPromotionStatus(promotionStatus.name());
|
||||
this.updateById(couponVO);
|
||||
this.mongoTemplate.save(couponVO);
|
||||
if (promotionStatus.name().equals(PromotionStatusEnum.START.name())) {
|
||||
PromotionMessage promotionMessage = new PromotionMessage(couponVO.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), couponVO.getStartTime(), couponVO.getEndTime());
|
||||
PromotionMessage promotionMessage = new PromotionMessage(couponVO.getId(), PromotionTypeEnum.COUPON.name(), promotionStatus.name(), couponVO.getStartTime(), couponVO.getEndTime());
|
||||
//更新延时任务
|
||||
this.timeTrigger.edit(TimeExecuteConstant.PROMOTION_EXECUTOR,
|
||||
promotionMessage,
|
||||
@ -166,7 +165,6 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
|
||||
DateUtil.getDelayTime(couponVO.getStartTime().getTime()),
|
||||
rocketmqCustomProperties.getPromotionTopic());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user