yanderong
2026-07-25 42d613ae435438b5fdf8195bf230f2ae165781b6
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();
    }
 
    /**
     * 每天11点执行科士达的数据同步
     */
    @Scheduled(cron = "0 0 23 * * ?")
    public void syncKsolarDataTask() {
        tStationInfoService.syncKsolarDataTask();
    }
}