@@ -29,7 +29,7 @@ public class ParamController { | |||
status = status == 1 ? 2 : 1; | |||
redisUtils.set("status",status); | |||
} | |||
boolean status = (Integer) redisUtils.get("status")==1?true:false; | |||
boolean status = (Integer) redisUtils.get("status") == 1; | |||
return JsonResult.success(status); | |||
} | |||
@@ -148,9 +148,11 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, | |||
} else if (ObjectUtil.isEmpty(jsonResult.getData()) && jsonResult.getCode() != 0) { | |||
return JsonResult.error(jsonResult.getMsg()); | |||
} else { | |||
ThMission thMissionUpdate=new ThMission(UpdateOrCreateEnum.UPDATE.getCode()); | |||
thMissionUpdate.setId(thMission.getId()); | |||
//修改执行时间为当前 | |||
thMission.setExecutionStartTime(new Date()); | |||
missionMapper.updateById(thMission); | |||
thMissionUpdate.setExecutionStartTime(new Date()); | |||
missionMapper.updateById(thMissionUpdate); | |||
//返回执行结果 | |||
return JsonResult.success(jsonResult.getMsg()); | |||
} |
@@ -46,7 +46,7 @@ public class ScheduledTask { | |||
.ge(ThMission::getExecutionStatus, 1) | |||
.eq(ThMission::getStatus, TaskStatusEnum.WAIT.getCode())); | |||
log.info("三秒钟一次"); | |||
log.info("一秒钟一次"); | |||
for (ThMission thMission : thMissions) { | |||
JsonResult jsonResult = inspectionService.executeTask(String.valueOf(thMission.getId())); |