1.eventDetail数据迁移
This commit is contained in:
@@ -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);
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user