Pu Zhibing
2024-12-26 22875a9b883293aa88c9ea02103a1e218835c6bc
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
package com.ruoyi.order.util;
 
import com.ruoyi.order.service.CommissionService;
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 CommissionService commissionService;
 
    @Scheduled(fixedRate = 60000)
    public void taskMonth() {
        commissionService.calculationCommission();
    }
 
    // 每天晚上23:59:59执行的定时任务
    @Scheduled(cron = "0 0 23 * * ?")
    public void taskLastDay() {
    
    }
 
}