소스 검색

状态判断

xueyiming 11 달 전
부모
커밋
09154307b2
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CoreServiceImpl.java

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

@@ -710,6 +710,12 @@ public class CoreServiceImpl implements CoreService {
                             planAccountMapper.updateByPrimaryKeySelective(planAccount);
                         }
                         if (updateStatus == 3) {
+                            if (StringUtils.isNotEmpty(pushStatusVO.getErrorMsg())) {
+                                //群发配额用完  不再重试
+                                if (pushStatusVO.getErrorMsg().contains("45028")) {
+                                    planAccount.setStatus(3);
+                                }
+                            }
                             planAccount.setRetryCount(planAccount.getRetryCount() + 1);
                             planAccountMapper.updateByPrimaryKeySelective(planAccount);
                         }
@@ -718,4 +724,9 @@ public class CoreServiceImpl implements CoreService {
             }
         }
     }
+
+    public static void main(String[] args) {
+        String error = "45028,has no masssend quota rid: 673fcc03-762b3ce0-0bfa729b";
+        System.out.println(error.contains("45028"));
+    }
 }