|
@@ -112,7 +112,7 @@ public class CorpServiceImpl implements CorpService {
|
|
|
.handler(new CorpMessageHandler() {
|
|
.handler(new CorpMessageHandler() {
|
|
|
@Override
|
|
@Override
|
|
|
public CorpXmlOutMessage handle(CorpXmlMessage message, Map<String, Object> context, CorpService corpService) throws Exception {
|
|
public CorpXmlOutMessage handle(CorpXmlMessage message, Map<String, Object> context, CorpService corpService) throws Exception {
|
|
|
- return corpEventActionService.addExternalContact(message.getToUserName(), message.getUserId(), message.getExternalUserId(), message.getWelcomeCode(), context);
|
|
|
|
|
|
|
+ return corpEventActionService.addExternalContact(message, context);
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.end()
|
|
.end()
|
|
@@ -130,7 +130,7 @@ public class CorpServiceImpl implements CorpService {
|
|
|
.handler(new CorpMessageHandler() {
|
|
.handler(new CorpMessageHandler() {
|
|
|
@Override
|
|
@Override
|
|
|
public CorpXmlOutMessage handle(CorpXmlMessage message, Map<String, Object> context, CorpService corpService) throws Exception {
|
|
public CorpXmlOutMessage handle(CorpXmlMessage message, Map<String, Object> context, CorpService corpService) throws Exception {
|
|
|
- return corpEventActionService.addExternalContact(message.getToUserName(), message.getUserId(), message.getExternalUserId(), message.getWelcomeCode(), context);
|
|
|
|
|
|
|
+ return corpEventActionService.addExternalContact(message, context);
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.end()
|
|
.end()
|
|
@@ -248,7 +248,10 @@ public class CorpServiceImpl implements CorpService {
|
|
|
THREAD_POOL.execute(() -> {
|
|
THREAD_POOL.execute(() -> {
|
|
|
for (String externalUserid : list) {
|
|
for (String externalUserid : list) {
|
|
|
try {
|
|
try {
|
|
|
- corpEventActionService.addExternalContact(corpId, null, externalUserid, null, null);
|
|
|
|
|
|
|
+ CorpXmlMessage message = new CorpXmlMessage();
|
|
|
|
|
+ message.setToUserName(corpId);
|
|
|
|
|
+ message.setExternalUserId(externalUserid);
|
|
|
|
|
+ corpEventActionService.addExternalContact(message, null);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
@@ -258,7 +261,10 @@ public class CorpServiceImpl implements CorpService {
|
|
|
} else {
|
|
} else {
|
|
|
for (String externalUserid : externalList) {
|
|
for (String externalUserid : externalList) {
|
|
|
try {
|
|
try {
|
|
|
- corpEventActionService.addExternalContact(corpId, null, externalUserid, null, null);
|
|
|
|
|
|
|
+ CorpXmlMessage message = new CorpXmlMessage();
|
|
|
|
|
+ message.setToUserName(corpId);
|
|
|
|
|
+ message.setExternalUserId(externalUserid);
|
|
|
|
|
+ corpEventActionService.addExternalContact(message, null);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
@@ -317,7 +323,10 @@ public class CorpServiceImpl implements CorpService {
|
|
|
CorpUser corpUser = null;
|
|
CorpUser corpUser = null;
|
|
|
if (corpUserAuth == null) {
|
|
if (corpUserAuth == null) {
|
|
|
//尝试添加客户
|
|
//尝试添加客户
|
|
|
- corpEventActionService.addExternalContact(corpId, null, externalUserid, null, null);
|
|
|
|
|
|
|
+ CorpXmlMessage message = new CorpXmlMessage();
|
|
|
|
|
+ message.setToUserName(corpId);
|
|
|
|
|
+ message.setExternalUserId(externalUserid);
|
|
|
|
|
+ corpEventActionService.addExternalContact(message, null);
|
|
|
corpUserAuth = corpUserAuthMapper.selectOne(corpUserAuthWrapper);
|
|
corpUserAuth = corpUserAuthMapper.selectOne(corpUserAuthWrapper);
|
|
|
if (corpUserAuth != null) {
|
|
if (corpUserAuth != null) {
|
|
|
corpUser = corpUserMapper.selectOne(Wrappers.lambdaQuery(CorpUser.class).eq(CorpUser::getId, corpUserAuth.getCorpUserId()).last("limit 1"));
|
|
corpUser = corpUserMapper.selectOne(Wrappers.lambdaQuery(CorpUser.class).eq(CorpUser::getId, corpUserAuth.getCorpUserId()).last("limit 1"));
|