Browse Source

修改定时任务

tags/v1.1.0
wanghaoran 2 years ago
parent
commit
65e17ab20b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/task/ScheduledTask.java

+ 2
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/task/ScheduledTask.java View File

@@ -40,7 +40,7 @@ public class ScheduledTask {

List<ThMission> thMissions = missionMapper.selectList(new LambdaQueryWrapper<ThMission>()
.eq(ThMission::getMark, MarkTypeEnum.VALID.getCode())
.ge(ThMission::getExecutionStartTime, dateformat.format(new Date()))
.eq(ThMission::getExecutionStartTime, dateformat.format(new Date()))
//查询未执行任务
.eq(ThMission::getExecutionStatus, 1)
.eq(ThMission::getStatus, TaskStatusEnum.WAIT.getCode()));
@@ -48,6 +48,7 @@ public class ScheduledTask {
log.info("执行定时执行飞行任务,一秒钟一次");

for (ThMission thMission : thMissions) {
log.info("执行定时执行飞行任务:" + thMission.getId());
JsonResult jsonResult = inspectionService.executeTask(String.valueOf(thMission.getId()), null);
thMission.setExecutionStatus(2);
if(jsonResult.getCode()!=0 && ObjectUtil.isEmpty(jsonResult.getData())){

Loading…
Cancel
Save