| | |
| | | package com.ruoyi.member.scheduler; |
| | | |
| | | |
| | | import com.ruoyi.common.security.utils.SchedulerUtils; |
| | | import com.ruoyi.member.service.coupon.CouponService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | public class MemberrScheduler { |
| | | |
| | | |
| | | @Resource |
| | | @Autowired |
| | | private SchedulerUtils schedulerUtils; |
| | | |
| | | @Resource |
| | |
| | | /** |
| | | * 优惠券定时发送 |
| | | */ |
| | | @Scheduled(cron="0 0/5 * * * ?") |
| | | @Scheduled(cron="0 0 0 * * ?") |
| | | private void autoCheckNoPayOrder(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("check no pay order scheduler task is running "); |
| | | log.info("优惠券定时发放任务开始执行"); |
| | | couponService.timingSendCoupon(); |
| | | } |
| | | } |
| | | |