소스 검색

调整任务策略,系统任务无法删除

wangq 4 년 전
부모
커밋
e501b5b4f6
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java

+ 6 - 0
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java

@@ -124,12 +124,18 @@ public class JobInfoController {
     @RequestMapping("/remove")
     @RequestMapping("/remove")
     @ResponseBody
     @ResponseBody
     public ReturnT<String> remove(int id) {
     public ReturnT<String> remove(int id) {
+        if(id<=9){
+            return new ReturnT<String>(ReturnT.FAIL_CODE, "系统定制任务无法删除!");
+        }
         return xxlJobService.remove(id);
         return xxlJobService.remove(id);
     }
     }
 
 
     @RequestMapping("/stop")
     @RequestMapping("/stop")
     @ResponseBody
     @ResponseBody
     public ReturnT<String> pause(int id) {
     public ReturnT<String> pause(int id) {
+//        if(id<=9){
+//            return new ReturnT<String>(ReturnT.FAIL_CODE, "系统定制任务无法终止!");
+//        }
         return xxlJobService.stop(id);
         return xxlJobService.stop(id);
     }
     }