ipo
zyy
2025-12-30 d9430c2ed4e2bc3564f4c9057563dd5f5605f28b
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
32
33
34
package com.yami.trading.admin.task;
 
import com.yami.trading.init.cache.LoadRiskClientCache;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
@Component
@Slf4j
public class RefreshRiskClientJob {
    @Autowired
    private LoadRiskClientCache loadRiskClientCache;
 
    @Scheduled(cron = "0 */5 * * * ?")
    public void crawl() {
        try {
//            LocalDateTime now = LocalDateTime.now();
//            String timeStr = now.format(DateTimeFormatter.ofPattern("YYYY-MM-dd+HH:mm:ss"));
//            long t = now.toInstant(ZoneOffset.of("+8")).toEpochMilli();
//            String url = "https://flash-api.jin10.com/get_flash_list?channel=-8200&vip=1&max_time=%s&t=%s";
//            url = String.format(url, timeStr, t);
 
            loadRiskClientCache.loadData();
        } catch (Exception e) {
            log.error("金十资讯采集异常", e);
        }
    }
 
//    public static void main(String[] args) throws Exception {
//        Jin10InformationGet get = new Jin10InformationGet();
//        get.crawl();
//    }
}