wangyunpeng 2 недель назад
Родитель
Сommit
2d77d24525

+ 13 - 3
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/ContentServiceImpl.java

@@ -236,7 +236,12 @@ public class ContentServiceImpl implements ContentService {
 
         if (articleSortResponse == null || articleSortResponse.getData() == null) {
             log.info("articleSortResponse={}", articleSortResponse);
-            String message = String.format("排序结果为空 \nplanId=%s \naccountName=%s", planAccount.getPlanId(), planAccount.getAccountName());
+            String message = String.format("排序结果为空 \n" +
+                    "planId:%s \n" +
+                    "planName:%s \n" +
+                    "accountId:%s \n" +
+                    "accountName:%s \n",
+                    planAccount.getPlanId(), planAccount.getPlanName(), planAccount.getAccountId(), planAccount.getAccountName());
             LarkRobotUtil.sendMessage(message);
             return new ArrayList<>();
         }
@@ -256,8 +261,13 @@ public class ContentServiceImpl implements ContentService {
         if (CollectionUtils.isEmpty(articleSortResponse.getData().getRank_list())
                 || articleSortResponse.getData().getRank_list().size() < (planAccount.getPublishPreMinNum() - excludeContentSum)) {
             log.info("rank_list = {}", articleSortResponse.getData().getRank_list());
-            String message = String.format("排序结果不足 \nplanId=%s \naccountName=%s \nnum=%s",
-                    planAccount.getPlanId(), planAccount.getAccountName(), articleSortResponse.getData().getRank_list().size());
+            String message = String.format("排序结果不足 \n" +
+                            "planId:%s \n" +
+                            "planName:%s \n" +
+                            "accountId:%s \n" +
+                            "accountName:%s \n" +
+                            "num:%s",
+                    planAccount.getPlanId(), planAccount.getPlanName(), planAccount.getAccountId(), planAccount.getAccountName(), articleSortResponse.getData().getRank_list().size());
             LarkRobotUtil.sendMessage(message);
             // 清除待发布缓存,成功后异步触发一次 /recommend 重建数据
             triggerRebuildRecommend(planAccount, articleSortRequest);

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

@@ -703,14 +703,12 @@ public class CoreServiceImpl implements CoreService {
                 if (planAccount.getRetryCount() >= 10) {
                     planAccount.setStatus(3);
                     planAccountMapper.updateByPrimaryKeySelective(planAccount);
-                    LarkRobotUtil.sendMessage("计划发布失败3次,请查看 账号计划id为" + planAccount.getPlanId());
                     return false;
                 }
             } else if (planAccount.getRetryCount() >= 3) {
                 // 公众号群发每天最多尝试3次
                 planAccount.setStatus(3);
                 planAccountMapper.updateByPrimaryKeySelective(planAccount);
-                LarkRobotUtil.sendMessage("计划发布失败3次,请查看 账号计划id为" + planAccount.getPlanId());
                 return false;
             }
         } else {
@@ -718,7 +716,6 @@ public class CoreServiceImpl implements CoreService {
             if (planAccount.getRetryCount() >= 5) {
                 planAccount.setStatus(3);
                 planAccountMapper.updateByPrimaryKeySelective(planAccount);
-                LarkRobotUtil.sendMessage("计划发布失败5次,请查看 账号计划id为" + planAccount.getPlanId());
                 return false;
             }
         }
@@ -1541,7 +1538,12 @@ public class CoreServiceImpl implements CoreService {
                     && !pushStatusVO.getErrorMsg().contains("45028")
                     && !pushStatusVO.getErrorMsg().contains("所有分组均发表失败")) {
                 log.error("push error pushId={} msg={}", pushId, pushStatusVO.getErrorMsg());
-                String message = String.format("发布失败,请查看\npushId=%s \n失败信息:%s \n账号名称:%s \n计划id:%s \n计划名称:%s",
+                String message = String.format("发布失败,请查看\n" +
+                                "账号名称:%s \n" +
+                                "计划id:%s \n" +
+                                "计划名称:%s \n" +
+                                "pushId:%s \n" +
+                                "失败信息:%s ",
                         pushId, pushStatusVO.getErrorMsg(), planAccount.getAccountName(),
                         planAccount.getPlanId(), planAccount.getPlanName());
                 LarkRobotUtil.sendMessage(message);