yanderong
2026-07-27 39e943b054a6c62b22a6fe28199f17361807b143
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.other.task;
 
import com.ruoyi.other.service.TExchangeCodePackageService;
import com.ruoyi.other.service.TStationInfoService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
import javax.annotation.Resource;
 
@Component
public class ExchangeCodeExpireTask {
 
    @Resource
    private TExchangeCodePackageService exchangeCodePackageService;
 
    @Resource
    private TStationInfoService tStationInfoService;
 
    @Scheduled(cron = "0 */5 * * * ?")
    public void refreshExpiredPackageCodes() {
        exchangeCodePackageService.refreshExpiredPackageCodes();
    }
 
    /**
     * 每2小时执行科士达的数据同步
     */
    @Scheduled(cron = "0 0 */2 * * ?")
    public void syncKsolarDataTask() {
        tStationInfoService.syncKsolarDataTask();
    }
}