From 272188e47087a8ef92eb0a48b122fa1c73ea94d3 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期二, 24 九月 2024 00:15:25 +0800 Subject: [PATCH] Merge remote-tracking branch 'remote-v2/master-v2' into master-v2 --- src/main/java/com/mzl/flower/schedule/ScheduleService.java | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/mzl/flower/schedule/ScheduleService.java b/src/main/java/com/mzl/flower/schedule/ScheduleService.java index 6130515..109e14c 100644 --- a/src/main/java/com/mzl/flower/schedule/ScheduleService.java +++ b/src/main/java/com/mzl/flower/schedule/ScheduleService.java @@ -12,6 +12,7 @@ import com.mzl.flower.mapper.partner.PartnerMapper; import com.mzl.flower.mapper.payment.OrderMapper; import com.mzl.flower.service.coupon.CouponRecordService; +import com.mzl.flower.service.coupon.CouponTemplateService2; import com.mzl.flower.service.flower.FlowerCategoryService; import com.mzl.flower.service.flower.FlowerService; import com.mzl.flower.service.menber.impl.GrowthValueDealService; @@ -70,6 +71,9 @@ @Autowired private MemberGrowthRecordMapper memberGrowthRecordMapper; + + @Autowired + private CouponTemplateService2 couponTemplateService2; @Scheduled(cron = "1 0/30 * * * ?") public void calculateAvePrice() { @@ -240,4 +244,26 @@ } + @Scheduled(cron = "0 0/5 * * * ?") + public void expireActivityCouponTemplateAll() { + log.info("优惠券模版过期下架开始:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss")); + + // 下架有所的过期的优惠券 + couponTemplateService2.expireActivityCouponTemplateAll(); + + log.info("优惠券模版过期下架开始:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss")); + } + + @Scheduled(cron = "0 0/5 * * * ?") + public void expireCouponRecordAll() { + log.info("优惠券记录过期开始:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss")); + + // 下架有所的过期的优惠券 + couponRecordService.expireCouponRecordAll(); + + log.info("优惠券记录过期开始:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss")); + } + + + } -- Gitblit v1.9.3