Commit c6b2ecd5 by 徐高华

企微自建转代开发调整

parent f44bb58e
......@@ -81,7 +81,7 @@ public class WxEnterpriseQwDTO implements Serializable {
}
public boolean isSelf() {
return this.wxSecurityType == 5 ;
return this.wxSecurityType == 5 || this.wxSecurityType == 6;
}
public int getWxSecurityType() {
......
......@@ -77,7 +77,7 @@ public class SecretSettingServiceImpl implements SecretSettingService {
return null;
}
// 如果是纯自建,使用自建的token
if(qwDTO.isSelf()) {
if(qwDTO.isSelf() && StringUtils.isNotBlank(qwDTO.getUrlHost())) {
secretType = SecretTypeEnum.SELF_APP.getVal() ;
}
TabSecretSetting secretSetting = secretSettingMapper.getSecretSetting(wxEnterpriseId, secretType, null);
......
......@@ -121,6 +121,16 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
}
qw.setHbWxaAppid(this.getHbAppid(qw, config.getAppid()));
qw.setSelf3thSecret(this.getSecret(qw, config.getWxSuiteid()));
// 只使用代开发(用于从自建转代开发)
if(qw.getWxSecurityType()==6) {
qw.setHbWxaAppid(config.getAppid());
TabSecretSetting secret = secretSettingMapper.getSecretSetting(wxEnterpriseId, SecretTypeEnum.CUSTOMIZED_APP.getVal(), null);
qw.setSelfSecret(secret.getSecretVal());
qw.setAgentId(secret.getAgentId());
qw.setAgentName(secret.getAgentName());
qw.setSelf3thSecret(secret.getSecretVal());
qw.setUrlHost(null);
}
logger.info("企微所有corpid信息={}",JSON.toJSON(qw));
return qw;
}
......
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