提交 52ee0fbe 作者: 沈振路

获客链接异常事件消费发布处理调整

上级 fa44743f
package com.yaoyaozw.customer.publisher; package com.yaoyaozw.customer.publisher;
import cn.hutool.json.JSONUtil;
import com.yaoyaozw.customer.dto.AcquisitionExceptionHandleParam; import com.yaoyaozw.customer.dto.AcquisitionExceptionHandleParam;
import com.yaoyaozw.customer.entity.AuthorizerInfo; import com.yaoyaozw.customer.entity.AuthorizerInfo;
import com.yaoyaozw.customer.event.AcquisitionExceptionEvent; import com.yaoyaozw.customer.event.AcquisitionExceptionEvent;
...@@ -36,12 +37,7 @@ public class AcquisitionExceptionEventPublisher { ...@@ -36,12 +37,7 @@ public class AcquisitionExceptionEventPublisher {
log.warn("链接异常处理异常,链接Id:{},没有对应的可替换链接数据", linkId); log.warn("链接异常处理异常,链接Id:{},没有对应的可替换链接数据", linkId);
return; return;
} }
AuthorizerInfo authorizerInfo = replaceAcquisitionEntity.getAuthorizerInfo(); this.publishAcquisitionExceptionEvent(replaceAcquisitionEntity);
String fromPath = replaceAcquisitionEntity.getFromPath();
// 查询可用于替换的链接
String toPath = replaceAcquisitionEntity.getToPath();
this.publishAcquisitionExceptionEvent(new AcquisitionExceptionHandleParam(authorizerInfo, fromPath, toPath));
} catch (Exception e) { } catch (Exception e) {
log.error("链接异常处理异常,链接Id:{}", linkId, e); log.error("链接异常处理异常,链接Id:{}", linkId, e);
} }
...@@ -51,6 +47,7 @@ public class AcquisitionExceptionEventPublisher { ...@@ -51,6 +47,7 @@ public class AcquisitionExceptionEventPublisher {
public void publishAcquisitionExceptionEvent(AcquisitionExceptionHandleParam source) { public void publishAcquisitionExceptionEvent(AcquisitionExceptionHandleParam source) {
if (source == null || source.getAuthorizerInfo() == null || StringUtils.isAnyBlank(source.getFromPath(), source.getToPath())) { if (source == null || source.getAuthorizerInfo() == null || StringUtils.isAnyBlank(source.getFromPath(), source.getToPath())) {
log.error("publishAcquisitionExceptionEvent 链接异常处理异常,异常参数:{}", (source == null ? "NULL SOURCE" : JSONUtil.toJsonStr(source)));
return; return;
} }
log.info("准备替换公众号:{} 获客链接:{} 为:{}", source.getAuthorizerInfo().getNickName(), source.getFromPath(), source.getToPath()); log.info("准备替换公众号:{} 获客链接:{} 为:{}", source.getAuthorizerInfo().getNickName(), source.getFromPath(), source.getToPath());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论