Commit f18fd5f0 by 徐高华

自建

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