oralce同步到influxDB

This commit is contained in:
hzj
2024-01-18 14:24:48 +08:00
parent f4f71e78c4
commit 31b539f44e
9 changed files with 226 additions and 3 deletions

View File

@@ -0,0 +1,38 @@
package com.njcn.influx.job;
import com.njcn.influx.bo.param.TableEnum;
import com.njcn.influx.service.OracleToInfluxDBService;
import com.njcn.oracle.bo.param.DataAsynParam;
import com.njcn.oracle.bo.param.ServiceTypeEnum;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.time.LocalDate;
/**
* Description:
* Date: 2024/1/18 10:15【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Component
@EnableScheduling
@RequiredArgsConstructor
@Slf4j
public class OracleToInfluxDBJob {
private final OracleToInfluxDBService oracleToInfluxDBService;
@Scheduled(cron="0 0 1 * * ?")
public void execute() {
DataAsynParam dataAsynParam = new DataAsynParam();
dataAsynParam.setStartTime(LocalDate.now().plusDays(-1));
dataAsynParam.setEndTime(LocalDate.now().plusDays(-1));
dataAsynParam.setTableNames(TableEnum.getExecutableTypes());
oracleToInfluxDBService.dataBacthSysc(dataAsynParam);
}
}