| | |
| | | } |
| | | |
| | | /** |
| | | * 删除超过一天的上报历史记录 |
| | | * 删除超过一定天数的上报历史记录 |
| | | */ |
| | | @Scheduled(fixedDelay = 3000) |
| | | public void execute2() { |
| | | Boolean report = configService.getVal("REPORT", Boolean.class, false); |
| | | if (report) { |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.add(Calendar.DATE, 1); |
| | | List<TaskReport> list = taskReportService.list(new LambdaQueryWrapper<TaskReport>().eq(TaskReport::getCompleted, 1).ge(TaskReport::getUpdateTime, instance.getTime())); |
| | | instance.add(Calendar.DATE, 7); |
| | | List<TaskReport> list = taskReportService.list(new LambdaQueryWrapper<TaskReport>().ge(TaskReport::getUpdateTime, instance.getTime())); |
| | | Integer times = configService.getVal("REPORT_TIMES", Integer.class, 3); |
| | | for (TaskReport taskReport : list) { |
| | | if ((Cools.isEmpty(taskReport.getReportTimes()) ? 0 : taskReport.getReportTimes()) > times) { |
| | |
| | | .doPost(); |
| | | log.info("返回参数:{}", response); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | if (jsonObject != null && jsonObject.getInteger("code").equals(200)) { |
| | | return true; |
| | | } |
| | | } catch (IOException e) { |