yuliang 5 년 전
부모
커밋
b200767b58

+ 21 - 1
whepi-web/src/main/java/com/bofeng/controller/EpiAdminController.java

@@ -59,7 +59,7 @@ public class EpiAdminController {
     }
 
 //    @Scheduled(cron = "0 44 12 * * ?") //每天19点执行一次
-    @Scheduled(cron = "0 0 15 * * ?") //每天19点执行一次
+    @Scheduled(cron = "0 0 11 * * ?") //每天19点执行一次
     public void scheduledTaskByFixedDelay() {
         System.out.println("==============执行定时任务开始================");
         Long start = 0L, count = 100L;
@@ -79,6 +79,26 @@ public class EpiAdminController {
         System.out.println("==============执行定时任务完毕================");
     }
 
+    @Scheduled(cron = "0 0 19 * * ?") //每天19点执行一次
+    public void scheduledTaskByFixedDelay2() {
+        System.out.println("==============执行定时任务开始================");
+        Long start = 0L, count = 100L;
+        while (true) {
+            List<UserOpen> userOpens = userOpenMapper.getOpenUser(start, count);
+            int re = 0;
+            for (UserOpen userOpen : userOpens) {
+                re += epiTemplateMessageService.systemSendRemindMessage(userOpen.getUserId(), userOpen.getOpenId());
+            }
+            System.out.println("==============执行定时任务"+re+"================");
+            start += count;
+            if (userOpens == null || userOpens.size()<count) {
+                break;
+            }
+        }
+
+        System.out.println("==============执行定时任务完毕================");
+    }
+
 //    @Scheduled(cron = "0 0 0 * * ?") //每天0点执行一次
     public void scheduledReportByFixedDelay() {
         System.out.println("==============执行定时任务开始================");

+ 1 - 1
whepi-web/src/main/java/com/bofeng/service/EpiTemplateMessageService.java

@@ -75,7 +75,7 @@ public class EpiTemplateMessageService {
             map.put("keyword3", str1);
             map.put("keyword4", "无");
             map.put("keyword5", "系统");
-            map.put("remark", "家园互助平台提醒您,为了您和他人的健康请及时提交每天的健康日报,上报情况将直接关系到您的小区临时出入");
+            map.put("remark", "家园互助平台提醒您,为了您和他人的健康请及时提交每天的健康日报,上报情况将直接关系到您的小区临时出入,如已填报忽略本消息");
             re = 1;
         }
         templateMessageService.sendSysRemindMessage(openId, "", map);