Commit 6eded49a by 徐高华

标签

parent cf245087
...@@ -83,6 +83,10 @@ public interface QywxTagApiService { ...@@ -83,6 +83,10 @@ public interface QywxTagApiService {
*/ */
public ServiceResponse syncFriendTagToQywxByExternalUserId(String wxEnterpriseId, String enterpriseId, String externalUserId, List<String> tagItemIds); public ServiceResponse syncFriendTagToQywxByExternalUserId(String wxEnterpriseId, String enterpriseId, String externalUserId, List<String> tagItemIds);
public ServiceResponse syncFriendTagToQywxByExternalUserId(String wxEnterpriseId, String enterpriseId, String externalUserId, List<String> tagItemIds , String externalUserInfo);
/** /**
* 同步企业微信导入gic的会员标签 * 同步企业微信导入gic的会员标签
* *
......
...@@ -479,7 +479,12 @@ public class QywxTagApiServiceImpl implements QywxTagApiService { ...@@ -479,7 +479,12 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
@Override @Override
public ServiceResponse syncFriendTagToQywxByExternalUserId(String wxEnterpriseId, String enterpriseId, String externalUserId, List<String> tagItemIds) { public ServiceResponse syncFriendTagToQywxByExternalUserId(String wxEnterpriseId, String enterpriseId, String externalUserId, List<String> tagItemIds) {
logger.info("同步好友标签到企业微信:externalUserId={},{}", externalUserId, JSONObject.toJSONString(tagItemIds)); return this.syncFriendTagToQywxByExternalUserId(wxEnterpriseId,enterpriseId,externalUserId,tagItemIds,null);
}
@Override
public ServiceResponse syncFriendTagToQywxByExternalUserId(String wxEnterpriseId, String enterpriseId, String externalUserId, List<String> tagItemIds, String externalUserInfo) {
logger.info("同步gic标签到企业微信:externalUserId={},{},{}", externalUserId, JSONObject.toJSONString(tagItemIds),externalUserInfo);
ServiceResponse resp = new ServiceResponse(); ServiceResponse resp = new ServiceResponse();
//获取需要同步的标签 //获取需要同步的标签
QywxSyncTagFormatPojo syncTagFormat = listSyncTagItems(wxEnterpriseId); QywxSyncTagFormatPojo syncTagFormat = listSyncTagItems(wxEnterpriseId);
...@@ -496,12 +501,14 @@ public class QywxTagApiServiceImpl implements QywxTagApiService { ...@@ -496,12 +501,14 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ; WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
//查询外部联系人 //查询外部联系人
String wxSuiteid = config.getWxSuiteid(); String wxSuiteid = config.getWxSuiteid();
String externalUseridInfo = null ; String externalUseridInfo = externalUserInfo ;
if(null == externalUseridInfo) {
if(qwDTO.isSelf()) { if(qwDTO.isSelf()) {
externalUseridInfo = this.qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), externalUserId,qwDTO.getUrlHost()) ; externalUseridInfo = this.qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), externalUserId,qwDTO.getUrlHost()) ;
}else { }else {
externalUseridInfo = this.qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid(), wxSuiteid, externalUserId); externalUseridInfo = this.qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid(), wxSuiteid, externalUserId);
} }
}
if (StringUtils.isBlank(externalUseridInfo)) { if (StringUtils.isBlank(externalUseridInfo)) {
logger.info("好友不存在"); logger.info("好友不存在");
resp.setCode(3); resp.setCode(3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment