提交 c5469940 作者: 沈振路

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

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