1.eventDetail数据迁移
This commit is contained in:
@@ -65,16 +65,16 @@ public class OracleToInfluxDBJob {
|
||||
}
|
||||
|
||||
|
||||
// @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);
|
||||
// }
|
||||
@Scheduled(cron="0 30 * * * ?")
|
||||
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