lideyin 5 vuotta sitten
vanhempi
commit
09f69d36a6

+ 3 - 2
examcloud-task-service/src/main/java/cn/com/qmth/examcloud/task/service/job/DisposePublishingNoticeTask.java

@@ -40,9 +40,10 @@ public class DisposePublishingNoticeTask extends AbstractTask {
         if (progressList == null || progressList.isEmpty()) {
             return;
         }
-        Long startUserId = 0L;
+
 
         for (NoticeRulePublishProgressBean progress : progressList) {
+            Long startUserId = 0L;
             int loopTimes = 0;
             Long lastMaxUserId = getLastMaxUserId(progress.getNoticeReceiverRuleType(), progress);
             if (lastMaxUserId != null) {
@@ -59,7 +60,7 @@ public class DisposePublishingNoticeTask extends AbstractTask {
                     updateNoticeStatus(progress.getNoticeId(), NoticeStatus.PUBLISHED);
                     break;
                 } else {
-                    startUserId = nextUserId+1;
+                    startUserId = nextUserId;
                     //处理中的状态只需更新一次
                     if (loopTimes == 1) {
                         updateNoticeStatus(progress.getNoticeId(), NoticeStatus.PUBLISHING);