Commit f18fd5f0 by 徐高华

自建

parent 7cfcdfb7
...@@ -63,7 +63,7 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService { ...@@ -63,7 +63,7 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService {
String configId = item.getWxConfigId(); String configId = item.getWxConfigId();
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(item.getWxEnterpriseId()); WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(item.getWxEnterpriseId());
QywxResponseDTO resp = null ; QywxResponseDTO resp = null ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
resp = qywxUserApiService.delContactWaySelf(qwDTO.getDkCorpid() ,qwDTO.getSelfSecret(), configId); resp = qywxUserApiService.delContactWaySelf(qwDTO.getDkCorpid() ,qwDTO.getSelfSecret(), configId);
}else { }else {
resp = qywxUserApiService.delContactWay(qwDTO.getThirdCorpid(), suiteId, configId); resp = qywxUserApiService.delContactWay(qwDTO.getThirdCorpid(), suiteId, configId);
......
...@@ -74,7 +74,7 @@ public class SecretSettingServiceImpl implements SecretSettingService { ...@@ -74,7 +74,7 @@ public class SecretSettingServiceImpl implements SecretSettingService {
} }
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ; WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
// 如果是纯自建,使用自建的token // 如果是纯自建,使用自建的token
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
secretType = SecretTypeEnum.CONTACT_CUSTOMER.getVal() ; secretType = SecretTypeEnum.CONTACT_CUSTOMER.getVal() ;
} }
TabSecretSetting secretSetting = secretSettingMapper.getSecretSetting(wxEnterpriseId, secretType, null); TabSecretSetting secretSetting = secretSettingMapper.getSecretSetting(wxEnterpriseId, secretType, null);
......
...@@ -208,7 +208,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService { ...@@ -208,7 +208,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
} }
qywxWelcomeMsgDTO.setWelcomeCode(welcomeCode); qywxWelcomeMsgDTO.setWelcomeCode(welcomeCode);
String result = null ; String result = null ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
log.info("自建={}",corpid,qwDTO.getSelfSecret()); log.info("自建={}",corpid,qwDTO.getSelfSecret());
result = this.qywxUserApiService.sendSelfWelcomeMsgByExternal(corpid, qwDTO.getSelfSecret(), result = this.qywxUserApiService.sendSelfWelcomeMsgByExternal(corpid, qwDTO.getSelfSecret(),
qywxWelcomeMsgDTO); qywxWelcomeMsgDTO);
......
...@@ -184,7 +184,7 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService { ...@@ -184,7 +184,7 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
@Override @Override
public void updateWxSecurityType(String wxEnterpriseId) { public void updateWxSecurityType(String wxEnterpriseId) {
WxEnterpriseQwDTO qwDTO = this.getQwInfo(wxEnterpriseId) ; WxEnterpriseQwDTO qwDTO = this.getQwInfo(wxEnterpriseId) ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
return ; return ;
} }
int wxSecurityType = this.calcSecretType(wxEnterpriseId); int wxSecurityType = this.calcSecretType(wxEnterpriseId);
......
...@@ -1127,7 +1127,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -1127,7 +1127,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String externalUserid = dto.getExternalUserid(); String externalUserid = dto.getExternalUserid();
ExternalUserDTO externalUserDTO; ExternalUserDTO externalUserDTO;
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ; WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
String unionIdJson = qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), dto.getExternalUserid()); String unionIdJson = qywxUserApiService.getCorpSelfExternalUseridInfo(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), dto.getExternalUserid());
if (StringUtils.isBlank(unionIdJson)) { if (StringUtils.isBlank(unionIdJson)) {
log.info("好友不存在"); log.info("好友不存在");
......
...@@ -438,7 +438,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -438,7 +438,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
userIds.add(relationDTO.getQwUserId()); userIds.add(relationDTO.getQwUserId());
} }
QywxExternalcontactResultDTO configResp = null ; QywxExternalcontactResultDTO configResp = null ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
configResp = qywxUserApiService.addContactWaySelf(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), send); configResp = qywxUserApiService.addContactWaySelf(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), send);
}else { }else {
configResp = qywxUserApiService.addContactWay(qwDTO.getThirdCorpid(), config.getWxSuiteid(), send); configResp = qywxUserApiService.addContactWay(qwDTO.getThirdCorpid(), config.getWxSuiteid(), send);
......
...@@ -541,7 +541,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService { ...@@ -541,7 +541,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
} }
} }
QywxExternalcontactResultDTO wxResp = null ; QywxExternalcontactResultDTO wxResp = null ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
wxResp = qywxUserApiService.addContactWaySelf(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), paramsDTO); wxResp = qywxUserApiService.addContactWaySelf(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), paramsDTO);
}else { }else {
wxResp = qywxUserApiService.addContactWay(qwDTO.getThirdCorpid(), config.getWxSuiteid(), paramsDTO); wxResp = qywxUserApiService.addContactWay(qwDTO.getThirdCorpid(), config.getWxSuiteid(), paramsDTO);
......
...@@ -160,7 +160,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -160,7 +160,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
qywxExternalcontactDTO.setUser(userIds); qywxExternalcontactDTO.setUser(userIds);
logger.info("新增活码参数:{}", JSON.toJSONString(qywxExternalcontactDTO)); logger.info("新增活码参数:{}", JSON.toJSONString(qywxExternalcontactDTO));
QywxExternalcontactResultDTO qywxExternalcontactResultDTO = null ; QywxExternalcontactResultDTO qywxExternalcontactResultDTO = null ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
qywxExternalcontactResultDTO = qywxUserApiService.addContactWaySelf(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), qywxExternalcontactDTO); qywxExternalcontactResultDTO = qywxUserApiService.addContactWaySelf(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), qywxExternalcontactDTO);
}else { }else {
qywxExternalcontactResultDTO = qywxUserApiService.addContactWay(corpid, config.getWxSuiteid(), qywxExternalcontactDTO); qywxExternalcontactResultDTO = qywxUserApiService.addContactWay(corpid, config.getWxSuiteid(), qywxExternalcontactDTO);
...@@ -348,7 +348,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -348,7 +348,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
} }
qywxExternalcontactDTO.setUser(userIds); qywxExternalcontactDTO.setUser(userIds);
QywxResponseDTO qywxResponseDTO = null ; QywxResponseDTO qywxResponseDTO = null ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
qywxResponseDTO = qywxUserApiService.updateContactWaySelf(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), qywxExternalcontactDTO); qywxResponseDTO = qywxUserApiService.updateContactWaySelf(qwDTO.getDkCorpid(), qwDTO.getSelfSecret(), qywxExternalcontactDTO);
}else { }else {
qywxResponseDTO = qywxUserApiService.updateContactWay(qwDTO.getThirdCorpid(), config.getWxSuiteid(), qywxExternalcontactDTO); qywxResponseDTO = qywxUserApiService.updateContactWay(qwDTO.getThirdCorpid(), config.getWxSuiteid(), qywxExternalcontactDTO);
...@@ -703,7 +703,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -703,7 +703,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
if (StringUtils.isNotBlank(wxConfigId)) { if (StringUtils.isNotBlank(wxConfigId)) {
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(hmQrcodeBO.getWxEnterpriseId()); WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(hmQrcodeBO.getWxEnterpriseId());
QywxResponseDTO qywxResponseDTO = null ; QywxResponseDTO qywxResponseDTO = null ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
qywxResponseDTO = qywxUserApiService.delContactWaySelf(qwDTO.getDkCorpid() ,qwDTO.getSelfSecret(), wxConfigId); qywxResponseDTO = qywxUserApiService.delContactWaySelf(qwDTO.getDkCorpid() ,qwDTO.getSelfSecret(), wxConfigId);
}else { }else {
qywxResponseDTO = qywxUserApiService.delContactWay(qwDTO.getThirdCorpid(), config.getWxSuiteid(), wxConfigId); qywxResponseDTO = qywxUserApiService.delContactWay(qwDTO.getThirdCorpid(), config.getWxSuiteid(), wxConfigId);
...@@ -833,7 +833,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -833,7 +833,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
//查询出所有正常的导购 //查询出所有正常的导购
//企微已经开启联系我 //企微已经开启联系我
List<String> wxUserIdsList = null ; List<String> wxUserIdsList = null ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
wxUserIdsList = qywxUserApiService.listCorpExternalUserSelf(qwDTO.getDkCorpid(), qwDTO.getSelfSecret()); wxUserIdsList = qywxUserApiService.listCorpExternalUserSelf(qwDTO.getDkCorpid(), qwDTO.getSelfSecret());
}else { }else {
wxUserIdsList = qywxUserApiService.listCorpExternalUser(qwDTO.getThirdCorpid(), config.getWxSuiteid()); wxUserIdsList = qywxUserApiService.listCorpExternalUser(qwDTO.getThirdCorpid(), config.getWxSuiteid());
......
...@@ -163,7 +163,7 @@ public class WxEnterpriseController extends WebBaseController { ...@@ -163,7 +163,7 @@ public class WxEnterpriseController extends WebBaseController {
return resultResponse(HaoBanErrCode.ERR_10012); return resultResponse(HaoBanErrCode.ERR_10012);
} }
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseApiService.getQwInfo(wxEnterpriseId) ; WxEnterpriseQwDTO qwDTO = this.wxEnterpriseApiService.getQwInfo(wxEnterpriseId) ;
if(qwDTO.getWxSecurityType()==5) { if(qwDTO.isSelf()) {
return this.fail("自建应用不能刷新"); return this.fail("自建应用不能刷新");
} }
QywxCorpInfoDTO dto = qywxTokenManageService.getCorpInfo(qwDTO.getThirdCorpid(), config.getWxSuiteid()); QywxCorpInfoDTO dto = qywxTokenManageService.getCorpInfo(qwDTO.getThirdCorpid(), config.getWxSuiteid());
......
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