Showing
1 changed file
with
9 additions
and
0 deletions
@@ -312,6 +312,15 @@ public class TkTaskCenterServiceImpl | @@ -312,6 +312,15 @@ public class TkTaskCenterServiceImpl | ||
312 | throws SchedulerException { | 312 | throws SchedulerException { |
313 | String taskCenterId = immediateExecuteDTO.getId(); | 313 | String taskCenterId = immediateExecuteDTO.getId(); |
314 | boolean result = false; | 314 | boolean result = false; |
315 | + TkTaskCenterEntity entity = baseMapper.selectById(taskCenterId); | ||
316 | + if(null == entity){ | ||
317 | + throw new TkDataValidationException(ErrorMessage.INVALID_PARAMETER.getMessage()); | ||
318 | + } | ||
319 | + if(Objects.equals(entity.getState(), StatusEnum.DISABLE.getIndex())){ | ||
320 | + throw new TkDataValidationException( | ||
321 | + String.format( | ||
322 | + ErrorMessage.TASK_CENTER_IS_DISABLED.getMessage(), entity.getName())); | ||
323 | + } | ||
315 | // 直接调用任务中心任务执行 | 324 | // 直接调用任务中心任务执行 |
316 | SysJobDTO sysJobDTO = tkSysJobService.findSysJobBySourceId(taskCenterId); | 325 | SysJobDTO sysJobDTO = tkSysJobService.findSysJobBySourceId(taskCenterId); |
317 | if (null != sysJobDTO) { | 326 | if (null != sysJobDTO) { |