Pu Zhibing
2025-04-01 837b806fa21bb440c720edd1e980373eb529cb23
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
package com.ruoyi.chargingPile.util;
 
 
import com.ruoyi.chargingPile.service.TChargingPileService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
import javax.annotation.Resource;
 
 
/**
 * 定时任务工具类
 */
@Component
public class TaskUtil {
    
    @Resource
    private TChargingPileService chargingPileService;;
    
    
 
 
    /**
     * 每隔2分钟去处理的定时任务
     */
    @Scheduled(fixedRate = 120000)
    public void taskMinute(){
        chargingPileService.updateStatus();
    }
}