Cui Zhi Feng
2024-09-03 e8ad1cfc313236b6962d4fedb73043074cb382ee
src/main/java/com/mzl/flower/schedule/ScheduleService.java
@@ -9,6 +9,7 @@
import com.mzl.flower.mapper.flower.FlowerCategoryMapper;
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.flower.FlowerCategoryService;
import com.mzl.flower.service.flower.FlowerService;
import com.mzl.flower.service.menber.impl.GrowthValueDealService;
@@ -62,7 +63,10 @@
    @Autowired
    private GrowthValueDealService growthValueDealService;
    @Scheduled(cron = "1 0/20 * * * ?")
    @Autowired
    private CouponRecordService couponRecordService;
    @Scheduled(cron = "1 0/30 * * * ?")
    public void calculateAvePrice() {
        log.info("均价计算开始:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
        List<FlowerCategory> cLs = categoryMapper.selectList(new QueryWrapper<FlowerCategory>()
@@ -210,4 +214,20 @@
        log.info("成长值扣除结束:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
    }
    @Scheduled(cron = "0 30 0 1 * ?")
    public void grantVipCouponRecordList() {
        log.info("会员优惠券开始:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
        couponRecordService.grantVipCouponRecordList();
        log.info("会员优惠券结束:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
    }
    @Scheduled(cron = "0 30 0 1 * ?")
    public void expiredCouponRecordLastMon() {
        log.info("会员优惠券开始:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
        couponRecordService.expiredCouponRecordLastMon();
        log.info("会员优惠券结束:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
    }
}