提交 4cb6ca25 作者: 沈振路

获客链接替换监听器添加 try catch

上级 98540816
......@@ -37,6 +37,7 @@ public class DelayCustomerAcquisitionListener implements ApplicationListener<Acq
if (source == null) {
return;
}
try {
AuthorizerInfo authorizerInfo = source.getAuthorizerInfo();
String fromPath = source.getFromPath();
String toPath = source.getToPath();
......@@ -103,6 +104,9 @@ public class DelayCustomerAcquisitionListener implements ApplicationListener<Acq
WeChatTextDTO cover = new WeChatTextDTO().cover(msg, null, null);
WeChatUtils.sendErrorMessage(cover, "9934244e-9694-4a0c-95dd-ddd6ca4bd959");
}
} catch (Exception e) {
log.error("公众号:{} 延时客服链接从:{} 替换为:{} 异常:{}", source.getAuthorizerInfo().getNickName(), source.getFromPath(), source.getToPath(), e.getMessage(), e);
}
}
}
......@@ -43,6 +43,7 @@ public class FollowReplyAcquisitionListener implements ApplicationListener<Acqui
AuthorizerInfo authorizerInfo = source.getAuthorizerInfo();
String fromPath = source.getFromPath();
String toPath = source.getToPath();
try {
// 查询这个公众号延时客服用到了 fromPath 的地方,替换成 toPath
List<CustomerFollowReply> allCustomerFollowReplyList = customerFollowReplyService.list(new QueryWrapper<CustomerFollowReply>().eq("appid", authorizerInfo.getAppid()));
......@@ -110,6 +111,9 @@ public class FollowReplyAcquisitionListener implements ApplicationListener<Acqui
WeChatTextDTO cover = new WeChatTextDTO().cover(msg, null, null);
WeChatUtils.sendErrorMessage(cover, "9934244e-9694-4a0c-95dd-ddd6ca4bd959");
}
} catch (Exception e) {
log.error("公众号:{} 关回链接从:{} 替换为:{} 异常:{}", source.getAuthorizerInfo().getNickName(), source.getFromPath(), source.getToPath(), e.getMessage(), e);
}
}
}
......@@ -43,6 +43,7 @@ public class KeywordAcquisitionListener implements ApplicationListener<Acquisiti
AuthorizerInfo authorizerInfo = source.getAuthorizerInfo();
String fromPath = source.getFromPath();
String toPath = source.getToPath();
try {
// 查询这个公众号延时客服用到了 fromPath 的地方,替换成 toPath
List<CustomerKeyword> allCustomerKeywordList = customerKeywordService.list(new QueryWrapper<CustomerKeyword>().eq("appid", authorizerInfo.getAppid()));
......@@ -108,6 +109,9 @@ public class KeywordAcquisitionListener implements ApplicationListener<Acquisiti
WeChatTextDTO cover = new WeChatTextDTO().cover(msg, null, null);
WeChatUtils.sendErrorMessage(cover, "9934244e-9694-4a0c-95dd-ddd6ca4bd959");
}
} catch (Exception e) {
log.error("公众号:{} 关键词链接从:{} 替换为:{} 异常:{}", source.getAuthorizerInfo().getNickName(), source.getFromPath(), source.getToPath(), e.getMessage(), e);
}
}
}
......@@ -25,6 +25,7 @@ public class MenuAcquisitionListener implements ApplicationListener<AcquisitionE
if (source == null) {
return;
}
try {
BaseResult execResult = menuFeignClient.replaceAcquisitionLink(source);
if (!execResult.getSuccess()) {
log.error("公众号:{} 菜单链接从:{} 替换为:{} 失败:{}", source.getAuthorizerInfo().getNickName(), source.getFromPath(), source.getToPath(), execResult.getMessage());
......@@ -34,5 +35,8 @@ public class MenuAcquisitionListener implements ApplicationListener<AcquisitionE
String msg = "【菜单-获客链接替换】公众号:" + source.getAuthorizerInfo().getNickName() + " 获客链接:" + source.getFromPath() + " 已被替换为:" + source.getToPath();
WeChatTextDTO cover = new WeChatTextDTO().cover(msg, null, null);
WeChatUtils.sendErrorMessage(cover, "9934244e-9694-4a0c-95dd-ddd6ca4bd959");
} catch (Exception e) {
log.error("公众号:{} 菜单链接从:{} 替换为:{} 异常:{}", source.getAuthorizerInfo().getNickName(), source.getFromPath(), source.getToPath(), e.getMessage(), e);
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论