ソースを参照

Merge branch 'dev-xym-fix1' of Server/growth-manager into master

xueyiming 2 ヶ月 前
コミット
4ec02af8fc

+ 6 - 2
offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComHistoryDataJob.java

@@ -117,12 +117,16 @@ public class WeComHistoryDataJob {
         for (Corp corp : corps) {
             selectGroupMsgList(startTime, endTime, corp.getId(), null);
         }
+        boolean isAllSend = true;
         for (Corp corp : corps) {
             long notSentCount = newSelectAlertHistoryMessage(startTime, endTime + TimeConstant.HOUR, corp.getId(), corp.getName());
-            if (notSentCount == 0) {
-                redisTemplate.opsForValue().set(START_TIME_KEY, endTime, 1, TimeUnit.DAYS);
+            if (notSentCount > 0) {
+                isAllSend = false;
             }
         }
+        if (isAllSend) {
+            redisTemplate.opsForValue().set(START_TIME_KEY, endTime, 1, TimeUnit.DAYS);
+        }
         return ReturnT.SUCCESS;
     }