Selaa lähdekoodia

分组群发增加重试次数

wangyunpeng 4 viikkoa sitten
vanhempi
commit
baa7a75e2e

+ 5 - 2
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CoreServiceImpl.java

@@ -976,7 +976,7 @@ public class CoreServiceImpl implements CoreService {
         Map<String, List<PublishContent>> groupedByPushId = publishContents.stream()
                 .filter(content -> content.getPushId() != null) // 过滤掉 pushId 为空的情况
                 .collect(Collectors.groupingBy(PublishContent::getPushId));
-
+        Set<Long> planAccountIdSet = new HashSet<>();
         for (Map.Entry<String, List<PublishContent>> entry : groupedByPushId.entrySet()) {
             String pushId = entry.getKey();
             PushStatusParam param = new PushStatusParam();
@@ -1091,7 +1091,10 @@ public class CoreServiceImpl implements CoreService {
                 if (planAccount == null) {
                     continue;
                 }
-                planAccountService.updateRetry(planAccount);
+                if (!planAccountIdSet.contains(planAccountId)) {
+                    planAccountService.updateRetry(planAccount);
+                }
+                planAccountIdSet.add(planAccountId);
                 if (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_group_publish.getVal())) {
                     if (StringUtils.isNotEmpty(pushStatusVO.getErrorMsg())) {
                         //45028群发配额用完不再重试  48004封号账号也不再重试