提交 c5469940 作者: 沈振路

客服消息获取链接超频记录

上级 6bd00c8d
...@@ -51,6 +51,9 @@ public class CustomerServiceCommonAsyncComponent { ...@@ -51,6 +51,9 @@ public class CustomerServiceCommonAsyncComponent {
private final static Logger LOCAL_LOG = LoggerFactory.getLogger(CustomerServiceCommonAsyncComponent.class); private final static Logger LOCAL_LOG = LoggerFactory.getLogger(CustomerServiceCommonAsyncComponent.class);
private final static String OVER_FREQUENCY_STR = "over_frequency";
private final static String OVER_FREQUENCY_MSG = "访问速度过快";
@Autowired @Autowired
private RegisterUserEntityService userEntityService; private RegisterUserEntityService userEntityService;
@Autowired @Autowired
...@@ -327,9 +330,7 @@ public class CustomerServiceCommonAsyncComponent { ...@@ -327,9 +330,7 @@ public class CustomerServiceCommonAsyncComponent {
getCopyReferral(dateStr, authInfoVo, referralEntity); getCopyReferral(dateStr, authInfoVo, referralEntity);
} catch (Exception e) { } catch (Exception e) {
LOCAL_LOG.warn("公众号: {} 获取链接异常: {}", authInfoVo.getAccountName(), e.getMessage()); LOCAL_LOG.warn("公众号: {} 获取链接异常: {}", authInfoVo.getAccountName(), e.getMessage());
referralEntity.setReferral("error");
} }
referralEntityList.add(referralEntity); referralEntityList.add(referralEntity);
} }
...@@ -371,7 +372,11 @@ public class CustomerServiceCommonAsyncComponent { ...@@ -371,7 +372,11 @@ public class CustomerServiceCommonAsyncComponent {
referralEntity.setName(originKey); referralEntity.setName(originKey);
// 常用链接不需要日期 // 常用链接不需要日期
getCopyReferral(null, authInfoVo, referralEntity); try {
getCopyReferral(null, authInfoVo, referralEntity);
} catch (Exception e) {
LOCAL_LOG.warn("公众号: {} 获取链接异常: {}", authInfoVo.getAccountName(), e.getMessage());
}
referralEntityList.add(referralEntity); referralEntityList.add(referralEntity);
} }
...@@ -530,7 +535,6 @@ public class CustomerServiceCommonAsyncComponent { ...@@ -530,7 +535,6 @@ public class CustomerServiceCommonAsyncComponent {
getCopyReferral(dateStr, authInfoVo, targetReferralEntity); getCopyReferral(dateStr, authInfoVo, targetReferralEntity);
} catch (Exception e) { } catch (Exception e) {
LOCAL_LOG.warn("公众号: {} 获取链接异常: {}", targetAuthInfo.getNickName(), e.getMessage()); LOCAL_LOG.warn("公众号: {} 获取链接异常: {}", targetAuthInfo.getNickName(), e.getMessage());
targetReferralEntity.setReferral("error");
} }
} }
...@@ -586,6 +590,9 @@ public class CustomerServiceCommonAsyncComponent { ...@@ -586,6 +590,9 @@ public class CustomerServiceCommonAsyncComponent {
LOCAL_LOG.info("获取链接, 参数: {}", referralEntity); LOCAL_LOG.info("获取链接, 参数: {}", referralEntity);
R r = referralFeignClient.productReferral(referralEntity); R r = referralFeignClient.productReferral(referralEntity);
if (!r.getCode().equals(ApiResultConstant.SUCCESS_CODE)) { if (!r.getCode().equals(ApiResultConstant.SUCCESS_CODE)) {
if (OVER_FREQUENCY_MSG.equals(r.getMessage())) {
referralEntity.setReferral(OVER_FREQUENCY_STR);
}
throw new RuntimeException(r.getMessage()); throw new RuntimeException(r.getMessage());
} else { } else {
LOCAL_LOG.info("公众号: {} 获取链接成功", authInfoVo.getAccountName()); LOCAL_LOG.info("公众号: {} 获取链接成功", authInfoVo.getAccountName());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论