瀏覽代碼

添加报警信息

xueyiming 8 月之前
父節點
當前提交
e815ea9ecc

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

@@ -529,8 +529,20 @@ public class CoreServiceImpl implements CoreService {
                 continue;
             }
             if (StringUtils.isNotEmpty(pushStatusVO.getErrorMsg())) {
+                String accountName = "";
+                PublishContentExample publishContentExample = new PublishContentExample();
+                example.createCriteria().andPushIdEqualTo(pushId);
+                List<PublishContent> failPublishContents = publishContentMapper.selectByExample(publishContentExample);
+                if (!CollectionUtils.isEmpty(failPublishContents)) {
+                    Long planAccountId = failPublishContents.get(0).getPlanAccountId();
+                    PlanAccount planAccount = planAccountMapper.selectByPrimaryKey(planAccountId);
+                    if (planAccount != null && StringUtils.isNotEmpty(planAccount.getAccountName())) {
+                        accountName = planAccount.getAccountName();
+                    }
+                }
                 log.error("push error pushId={} msg={}", pushId, pushStatusVO.getErrorMsg());
-                LarkRobotUtil.sendMessage("发布失败,请查看,pushId=" + pushId + "失败信息" + pushStatusVO.getErrorMsg());
+                LarkRobotUtil.sendMessage("发布失败,请查看,pushId=" + pushId + "失败信息"
+                        + pushStatusVO.getErrorMsg() + "账号名称:" + accountName);
             }
             int updateStatus = 0;
             //推送失败  重新推送