2 Commits aaded86699 ... 5bcbc28311

Author SHA1 Message Date
  wangq 5bcbc28311 对发送者邮件进行调整 4 years ago
  wangq e501b5b4f6 调整任务策略,系统任务无法删除 4 years ago

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

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

+ 1 - 0
xxl-job-admin/src/main/java/com/xxl/job/admin/core/alarm/impl/EmailJobAlarm.java

@@ -32,6 +32,7 @@ public class EmailJobAlarm implements JobAlarm {
      *
      * @param jobLog
      */
+    @Override
     public boolean doAlarm(XxlJobInfo info, XxlJobLog jobLog){
         boolean alarmResult = true;
 

+ 5 - 6
xxl-job-admin/src/main/resources/application.properties

@@ -46,13 +46,12 @@ spring.datasource.hikari.max-lifetime=900000
 spring.datasource.hikari.connection-timeout=10000
 spring.datasource.hikari.connection-test-query=SELECT 1
 
-### xxl-job, email
-spring.mail.host=
+### xxl-job, email Áú³ÛÕÕÃ÷
+spring.mail.host=smtp.163.com
 spring.mail.port=25
-spring.mail.username=Áú³ÛÕÕÃ÷
-spring.mail.from=
-###longchizhaoming@outlook.com lczm123456 smtp-mail.outlook.com
-spring.mail.password=
+spring.mail.username=hn_longchi@163.com
+spring.mail.from=hn_longchi@163.com
+spring.mail.password=EYAYZIUZQHVNIOJG
 spring.mail.properties.mail.smtp.auth=true
 spring.mail.properties.mail.smtp.starttls.enable=true
 spring.mail.properties.mail.smtp.starttls.required=true