1.eventDetail数据迁移

This commit is contained in:
wr
2024-03-01 16:21:31 +08:00
parent 6f76a4f420
commit 43df281522
10 changed files with 225 additions and 38 deletions

View File

@@ -3,6 +3,7 @@ package com.njcn.influx.job;
import com.njcn.influx.bo.param.TableEnum;
import com.njcn.influx.service.OracleEventDetailToMysqlService;
import com.njcn.influx.service.OracleToInfluxDBService;
import com.njcn.influx.service.impl.OracleEventDetailToMysqlServiceImpl;
import com.njcn.oracle.bo.param.DataAsynParam;
import com.njcn.oracle.bo.param.ServiceTypeEnum;
import lombok.RequiredArgsConstructor;
@@ -64,16 +65,16 @@ public class OracleToInfluxDBJob {
}
/* @Scheduled(cron="0 55 23 * * ?")
public void executeEvent() {
DataAsynParam dataAsynParam = new DataAsynParam();
// 获取当前时间
LocalDateTime end = LocalDateTime.now();
// 减去24时
LocalDateTime begin = end.minusHours(24);
oracleEventDetailToMysqlService.eventBatch(begin,end);
}*/
// @Scheduled(cron="0 55 23 * * ?")
// public void executeEvent() {
// // 获取当前时间
// LocalDateTime now = LocalDateTime.now();
// // 减去一个小时
// LocalDateTime oneHourAgo = now.minusHours(1);
// // 将分钟和秒设置为0
// LocalDateTime result = oneHourAgo.truncatedTo(ChronoUnit.HOURS);
// // 加上59分钟59秒
// LocalDateTime modifiedResult = result.plusMinutes(59).plusSeconds(59);
// oracleEventDetailToMysqlService.eventBatch(result,modifiedResult);
// }
}