czt
2025-06-05 8460849733838c9e84d1016c51f5a0e6875d0a78
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.fzzy.igds.dzhwk.v1.timer;
 
import com.fzzy.igds.dzhwk.v1.ApiV1Server;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
 
/**
 * @Description 定时测试
 * @Author CZT
 * @Date 2025/6/5 19:53
 */
@Slf4j
@Service("TestScheduled")
public class TestV1Scheduled {
 
    @Resource
    private ApiV1Server apiV1Server;
 
    /**
     *
     * @param interfaceId 接口编码
     * @param startTime   起始时间
     * @param endTime     截止时间
     * @throws Exception
     */
    public void scheduled(String interfaceId, String startTime, String endTime) throws Exception {
 
        log.info("=====手动获取数据,接口编码={},时间段={}-->{}======", interfaceId, startTime, endTime);
 
        apiV1Server.pullData(interfaceId, DateUtils.parseDate(startTime, "yyyy-MM-dd HH:mm:ss"), DateUtils.parseDate(endTime, "yyyy-MM-dd HH:mm:ss"));
    }
}