huliguo
2025-04-17 19df67e19f23cd2a04d1c7f355e1e656f4140af4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.ruoyi.order.util;
 
 
import com.ruoyi.account.api.feignClient.UserPointClient;
import com.ruoyi.order.service.OrderService;
 
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
import javax.annotation.Resource;
 
 
/**
 * @author zhibing.pu
 * @date 2023/7/11 8:39
 */
@Component
public class TaskUtil {
 
 
 
    
    @Resource
    private OrderService orderService;
 
    
    
    //每分钟
    @Scheduled(fixedRate = 60000)
    public void taskMonth() {
        orderService.closeOrder();//定时任务关闭订单
    }
 
    // 每天晚上23:59:59执行的定时任务
    @Scheduled(cron = "0 0 23 * * ?")
    public void taskLastDay() {
    
    }
 
}