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")); } }