yangys
2025-09-19 9a5abe507d6602f2311ffbe1d7bf25e2b58d3a7a
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
package org.springblade.qinzhesync.task;
 
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.springblade.qinzhesync.service.QinzheSyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
 
@Slf4j
@Component
@EnableScheduling
public class QincheViewSyncTask {
    @Autowired
    private QinzheSyncService service;
    // 每5秒执行一次
    //@Scheduled(fixedRate = 1000000)
    //@Scheduled(cron = "0 1 0 * * ?") // 每天上午0点1分执行
    //@Scheduled(cron = "0 */5 * * * ?")
    @Scheduled(cron = "0 1 0 * * ?") //test
    public void executeSync() {
        service.syncData();
    }
 
}