| | |
| | | |
| | | |
| | | import com.ruoyi.order.service.order.OrderService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import lombok.extern.log4j.Log4j2; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | |
| | | @Component |
| | | @Slf4j |
| | | @Log4j2 |
| | | public class OrderScheduler { |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 定时检查订单状态任务开始执行 |
| | | * 每15分钟定时检查订单状态任务开始执行 |
| | | */ |
| | | @Scheduled(cron="0 0/15 * * * ?") |
| | | private void timingCheckMemberCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("定时检查订单状态任务开始执行"); |
| | | log.info("---------------定时检查订单状态任务开始执行---------------"); |
| | | orderService.checkOrderStatus(); |
| | | log.info("---------------定时检查订单状态任务结束执行---------------"); |
| | | } |
| | | } |
| | | |