Commit 0ee65315 by 徐高华

自建接口调整

parent c39600d3
...@@ -391,7 +391,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService { ...@@ -391,7 +391,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
private String getExternalUserName(WxEnterpriseQwDTO qwDTO, String externalUserId) { private String getExternalUserName(WxEnterpriseQwDTO qwDTO, String externalUserId) {
log.info("查询好友详情,externalUserId={},{}", externalUserId,qwDTO.getWxSecurityType()); log.info("查询好友详情,externalUserId={},{}", externalUserId,qwDTO.getWxSecurityType());
String userInfo = null ; String userInfo = null ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
userInfo =qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), externalUserId); userInfo =qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), externalUserId);
}else { }else {
userInfo =qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid(), config.getWxSuiteid(), externalUserId); userInfo =qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid(), config.getWxSuiteid(), externalUserId);
......
...@@ -1282,7 +1282,12 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -1282,7 +1282,12 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return null; return null;
} }
String wxOpenUseId = tabHaobanStaff.getWxOpenUseId(); String wxOpenUseId = tabHaobanStaff.getWxOpenUseId();
String uJ = qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid(), config.getWxSuiteid(), externalUserId); String uJ = null ;
if(qwDTO.isSelf()) {
uJ = this.qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), externalUserId) ;
}else {
uJ = this.qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid(), config.getWxSuiteid(), externalUserId);
}
if (StringUtils.isBlank(uJ)) { if (StringUtils.isBlank(uJ)) {
log.info("好友不存在"); log.info("好友不存在");
return null; return null;
...@@ -1632,7 +1637,12 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -1632,7 +1637,12 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
log.info("企业不存在"); log.info("企业不存在");
return null; return null;
} }
String uJ = qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid(), config.getWxSuiteid(), externalUserId); String uJ = null ;
if(qwDTO.isSelf()) {
uJ = this.qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), externalUserId) ;
}else {
uJ = this.qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid(), config.getWxSuiteid(), externalUserId);
}
if (StringUtils.isBlank(uJ)) { if (StringUtils.isBlank(uJ)) {
log.info("好友不存在"); log.info("好友不存在");
return null; return null;
......
...@@ -460,7 +460,12 @@ public class QywxTagApiServiceImpl implements QywxTagApiService { ...@@ -460,7 +460,12 @@ 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 = qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid(), wxSuiteid, externalUserId); String externalUseridInfo = null ;
if(qwDTO.isSelf()) {
externalUseridInfo = this.qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), externalUserId) ;
}else {
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);
...@@ -580,7 +585,12 @@ public class QywxTagApiServiceImpl implements QywxTagApiService { ...@@ -580,7 +585,12 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ; WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
//查询外部联系人 //查询外部联系人
String externalUseridInfo = qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid() , config.getWxSuiteid(), externalUserId); String externalUseridInfo = null ;
if(qwDTO.isSelf()) {
externalUseridInfo = this.qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), externalUserId) ;
}else {
externalUseridInfo = this.qywxUserApiService.getExternalUseridInfo(qwDTO.getThirdCorpid(), config.getWxSuiteid(), externalUserId);
}
if (StringUtils.isBlank(externalUseridInfo)) { if (StringUtils.isBlank(externalUseridInfo)) {
logger.info("好友不存在"); logger.info("好友不存在");
resp.setCode(2); resp.setCode(2);
...@@ -950,7 +960,9 @@ public class QywxTagApiServiceImpl implements QywxTagApiService { ...@@ -950,7 +960,9 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
if (StringUtils.isNotBlank(needDelTags)) { if (StringUtils.isNotBlank(needDelTags)) {
needDelTagList = Arrays.asList(needDelTags.split(",")); needDelTagList = Arrays.asList(needDelTags.split(","));
} }
QywxResponseDTO responseDTO = qywxUserApiService.markTag(corpid, suiteId, wxUserId, externalUserId, needSetTagList, needDelTagList); TabHaobanWxEnterprise wxEnterprise = this.wxEnterpriseService.getEnterpriseBycorpId(corpid) ;
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterprise.getWxEnterpriseId()) ;
QywxResponseDTO responseDTO = qywxUserApiService.markTag(corpid, QwUtils.getSecret(qwDTO, config.getWxSuiteid()), wxUserId, externalUserId, needSetTagList, needDelTagList , qwDTO.isSelf());
logger.info("操作返回:{}", JSONObject.toJSONString(responseDTO)); logger.info("操作返回:{}", JSONObject.toJSONString(responseDTO));
if (responseDTO.getErrcode() != 0) { if (responseDTO.getErrcode() != 0) {
logger.info("权限不对,重试三次:{},{}", wxUserId, externalUserId); logger.info("权限不对,重试三次:{},{}", wxUserId, externalUserId);
......
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