xueyiming пре 4 месеци
родитељ
комит
26ffabd2ec

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

@@ -603,12 +603,12 @@ public class CoreServiceImpl implements CoreService {
                 //发表失败
                 if (pushStatusVO.getPublishStatus() == 3) {
                     updateStatus = 3;
-                    if (StringUtils.isNotEmpty(pushStatusVO.getErrorCode())) {
-                        int errorCode = Integer.parseInt(pushStatusVO.getErrorCode());
-                        if (errorCode == 6 || errorCode == 7 || errorCode == 8 || errorCode == 999) {
-                            updateStatus = 2;
-                        }
-                    }
+//                    if (StringUtils.isNotEmpty(pushStatusVO.getErrorCode())) {
+//                        int errorCode = Integer.parseInt(pushStatusVO.getErrorCode());
+//                        if (errorCode == 6 || errorCode == 7 || errorCode == 8 || errorCode == 999) {
+//                            updateStatus = 2;
+//                        }
+//                    }
 
                 }
                 //发表成功
@@ -661,28 +661,28 @@ public class CoreServiceImpl implements CoreService {
                     }
                 }
             }
-            if (updateStatus == 0) {
-                //查询创建时间   重试超过2h 直接设置失败
-                long createTimestamp = entry.getValue().get(0).getCreateTime().getTime();
-                long nowTimestamp = System.currentTimeMillis();
-                if (nowTimestamp - createTimestamp > TimeConstant.MILLISECOND_HOUR * 2) {
-                    if (StringUtils.isNotEmpty(pushStatusVO.getErrorMsg())) {
-                        PublishContentExample publishContentExample = new PublishContentExample();
-                        publishContentExample.createCriteria().andPushIdEqualTo(pushId);
-                        PublishContent update = new PublishContent();
-                        if (StringUtils.isNotEmpty(pushStatusVO.getErrorMsg())) {
-                            update.setReason(pushStatusVO.getErrorMsg());
-                        }
-                        update.setStatus(3);
-                        publishContentMapper.updateByExampleSelective(update, publishContentExample);
-                        planAccountService.updateRetry(planAccount);
-                        LarkRobotUtil.sendMessage("重试超过2h失败,pushId=", pushId);
-                    } else {
-                        long hour = (nowTimestamp - createTimestamp) / 1000 / 3600;
-                        LarkRobotUtil.sendMessage("重试时间:" + hour + "pushId=", pushId);
-                    }
-                }
-            }
+//            if (updateStatus == 0) {
+//                //查询创建时间   重试超过2h 直接设置失败
+//                long createTimestamp = entry.getValue().get(0).getCreateTime().getTime();
+//                long nowTimestamp = System.currentTimeMillis();
+//                if (nowTimestamp - createTimestamp > TimeConstant.MILLISECOND_HOUR * 2) {
+//                    if (StringUtils.isNotEmpty(pushStatusVO.getErrorMsg())) {
+//                        PublishContentExample publishContentExample = new PublishContentExample();
+//                        publishContentExample.createCriteria().andPushIdEqualTo(pushId);
+//                        PublishContent update = new PublishContent();
+//                        if (StringUtils.isNotEmpty(pushStatusVO.getErrorMsg())) {
+//                            update.setReason(pushStatusVO.getErrorMsg());
+//                        }
+//                        update.setStatus(3);
+//                        publishContentMapper.updateByExampleSelective(update, publishContentExample);
+//                        planAccountService.updateRetry(planAccount);
+//                        LarkRobotUtil.sendMessage("重试超过2h失败,pushId=", pushId);
+//                    } else {
+//                        long hour = (nowTimestamp - createTimestamp) / 1000 / 3600;
+//                        LarkRobotUtil.sendMessage("重试时间:" + hour + "pushId=", pushId);
+//                    }
+//                }
+//            }
             if (StringUtils.isNotEmpty(pushStatusVO.getErrorMsg()) && !pushStatusVO.getErrorMsg().contains("45028")) {
                 log.error("push error pushId={} msg={}", pushId, pushStatusVO.getErrorMsg());
                 String message = String.format("发布失败,请查看,pushId=%s 失败信息:%s 账号名称:%s 计划名称:%s",