zhanghua
2023-09-28 fdad0fb55be953a928b9276239759ade18050e70
ycl-smoke/src/main/java/com/ycl/smoke/task/ScheduledTask.java
@@ -98,7 +98,7 @@
            if (responseDto.getStatus() == 200) {
                AlarmMsgResponseDto dto = JSON.parseObject(responseDto.getData().toString(), AlarmMsgResponseDto.class);
                List<OdsAlarmMsg> list = dto.getContent();
                System.out.println(list.size());
                // System.out.println(list.size());
                list.forEach(o -> {
                    try {
                        alarmMsgService.save(o);
@@ -185,8 +185,8 @@
    }
    @Scheduled(cron = "0 0 1 * * ?")   // 每天零点执行
//    @Scheduled(cron = "0/1 * * * * ?")   // 每秒执行
    //    @Scheduled(cron = "0 0 1 * * ?")   // 每天零点执行
    @Scheduled(cron = "0 */5 * * * ?")   // 每5分钟执行
    public void listDataIntime() {
        try {
            DataIntimeParamDto paramDto = DataIntimeParamDto.builder().build();
@@ -199,7 +199,8 @@
                List<OdsInTime> list = dataIntimeResponseDto.getContent();
                list.forEach(o -> {
                    try {
                        inTimeService.save(o);
                        o.setModifyTime(LocalDateTime.now());
                        inTimeService.saveOrUpdate(o);
                    } catch (Exception ex) {
                        System.out.printf(ex.getMessage());
                    }