提交 7e950681 编写于 作者: 孙喜旺

回调通知存入多企业id

上级 53b7fb6a
......@@ -29,5 +29,6 @@ public class WeEventBatchJobResultImpl implements WeCallBackEventFactory {
case "replace_party"://全量覆盖部门
break;
}
WeComeConfig.localCorpId.remove();
}
}
......@@ -25,5 +25,6 @@ public class WeEventChangeContactImpl implements WeCallBackEventFactory {
//新增: create_user 更新: update_user 删除:delete_user
String changeType = message.getChangeType();
weStrategyBeanFactory.getResource(changeType, message);
WeComeConfig.localCorpId.remove();
}
}
......@@ -25,5 +25,6 @@ public class WeEventChangeExternalChatImpl implements WeCallBackEventFactory {
WeComeConfig.localCorpId.set(message.getToUserName());
String changeType = message.getChangeType();
weStrategyBeanFactory.getResource(changeType,message);
WeComeConfig.localCorpId.remove();
}
}
......@@ -24,5 +24,6 @@ public class WeEventChangeExternalContactImpl implements WeCallBackEventFactory
WeComeConfig.localCorpId.set(message.getToUserName());
String changeType = message.getChangeType();
weStrategyBeanFactory.getResource(changeType,message);
WeComeConfig.localCorpId.remove();
}
}
......@@ -24,5 +24,6 @@ public class WeEventChangeExternalTagImpl implements WeCallBackEventFactory {
WeComeConfig.localCorpId.set(message.getToUserName());
String changeType = message.getChangeType()+"CustomerTag";
weStrategyBeanFactory.getResource(changeType,message);
WeComeConfig.localCorpId.remove();
}
}
......@@ -58,19 +58,23 @@ public class WeCallBackAddExternalContactImpl extends WeEventStrategy {
@Override
public void eventHandle(WxCpXmlMessageVO message) {
if (message.getExternalUserId() != null) {
WeFlowerCustomerRel weFlowerCustomerRel = weFlowerCustomerRelService.getOne(new LambdaQueryWrapper<WeFlowerCustomerRel>()
.eq(WeFlowerCustomerRel::getExternalUserid, message.getExternalUserId())
.eq(WeFlowerCustomerRel::getUserId,message.getUserId()));
weFlowerCustomerRelThreadLocal.set(weFlowerCustomerRel);
weCustomerService.getCustomersInfoAndSynchWeCustomer(message.getExternalUserId());
}
if (message.getState() != null && message.getWelcomeCode() != null) {
if (isFission(message.getState())) {
taskFissionRecordHandle(message.getState(), message.getWelcomeCode(), message.getUserId(), message.getExternalUserId());
} else {
empleCodeHandle(message.getState(),message.getToUserName(), message.getWelcomeCode(), message.getUserId(), message.getExternalUserId());
try {
if (message.getExternalUserId() != null) {
WeFlowerCustomerRel weFlowerCustomerRel = weFlowerCustomerRelService.getOne(new LambdaQueryWrapper<WeFlowerCustomerRel>()
.eq(WeFlowerCustomerRel::getExternalUserid, message.getExternalUserId())
.eq(WeFlowerCustomerRel::getUserId,message.getUserId()));
weFlowerCustomerRelThreadLocal.set(weFlowerCustomerRel);
weCustomerService.getCustomersInfoAndSynchWeCustomer(message.getExternalUserId());
}
if (message.getState() != null && message.getWelcomeCode() != null) {
if (isFission(message.getState())) {
taskFissionRecordHandle(message.getState(), message.getWelcomeCode(), message.getUserId(), message.getExternalUserId());
} else {
empleCodeHandle(message.getState(),message.getToUserName(), message.getWelcomeCode(), message.getUserId(), message.getExternalUserId());
}
}
} finally {
weFlowerCustomerRelThreadLocal.remove();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册