|
@@ -24,6 +24,7 @@ import cn.com.qmth.examcloud.examwork.api.response.DisposePublishingUserNoticeRe
|
|
import cn.com.qmth.examcloud.examwork.api.response.GetNoticeRulePublishProgressListResp;
|
|
import cn.com.qmth.examcloud.examwork.api.response.GetNoticeRulePublishProgressListResp;
|
|
import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
|
|
+import cn.com.qmth.examcloud.web.support.Naked;
|
|
import com.mysql.cj.util.StringUtils;
|
|
import com.mysql.cj.util.StringUtils;
|
|
import io.micrometer.core.instrument.util.DoubleFormat;
|
|
import io.micrometer.core.instrument.util.DoubleFormat;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -295,17 +296,18 @@ public class NoticeController extends ControllerSupport {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- @GetMapping("dipose")
|
|
|
|
|
|
+ @Naked
|
|
|
|
+ @GetMapping("disposetest")
|
|
@ApiOperation(value = "获取用户公告列表")
|
|
@ApiOperation(value = "获取用户公告列表")
|
|
- public void dipose(){
|
|
|
|
|
|
+ public void disposetest(){
|
|
//获取待处理的通知进度数据
|
|
//获取待处理的通知进度数据
|
|
List<NoticeRulePublishProgressEntity> progressList = noticeService.getToBeDisposedNoticeRulePublishProgressList();
|
|
List<NoticeRulePublishProgressEntity> progressList = noticeService.getToBeDisposedNoticeRulePublishProgressList();
|
|
if (progressList == null || progressList.isEmpty()) {
|
|
if (progressList == null || progressList.isEmpty()) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- Long startUserId = 0L;
|
|
|
|
|
|
|
|
for (NoticeRulePublishProgressEntity progress : progressList) {
|
|
for (NoticeRulePublishProgressEntity progress : progressList) {
|
|
|
|
+ Long startUserId = 0L;
|
|
int loopTimes = 0;
|
|
int loopTimes = 0;
|
|
Long lastMaxUserId = getLastMaxUserId(progress.getNoticeReceiverRuleType(), progress);
|
|
Long lastMaxUserId = getLastMaxUserId(progress.getNoticeReceiverRuleType(), progress);
|
|
if (lastMaxUserId != null) {
|
|
if (lastMaxUserId != null) {
|
|
@@ -318,7 +320,7 @@ public class NoticeController extends ControllerSupport {
|
|
noticeService.updateNoticeStatus(progress.getNoticeId(), NoticeStatus.PUBLISHED);
|
|
noticeService.updateNoticeStatus(progress.getNoticeId(), NoticeStatus.PUBLISHED);
|
|
break;
|
|
break;
|
|
} else {
|
|
} else {
|
|
- startUserId = nextUserId+1;
|
|
|
|
|
|
+ startUserId = nextUserId;
|
|
//处理中的状态只需更新一次
|
|
//处理中的状态只需更新一次
|
|
if (loopTimes == 1) {
|
|
if (loopTimes == 1) {
|
|
noticeService.updateNoticeStatus(progress.getNoticeId(), NoticeStatus.PUBLISHING);
|
|
noticeService.updateNoticeStatus(progress.getNoticeId(), NoticeStatus.PUBLISHING);
|