Commit c7608810 by 徐高华

Merge branch 'feature/xgh/20241月迭代' into 'developer'

自建通讯录回调

See merge request !1679
parents 4394dee6 28324b54
......@@ -165,6 +165,20 @@ public class MessageApiServiceImpl implements MessageApiService {
}
}
private String getWxEnterpriseId(String corpid) {
String wxEnterpriseId = null ;
TabHaobanWxApplication wxApplication = wxApplicationService.selectByCorpId(corpid);
if (null == wxApplication) {
TabHaobanWxEnterprise wxEnterprise = this.wxEnterpriseService.getEnterpriseBycorpId(corpid) ;
if(null != wxEnterprise) {
wxEnterpriseId = wxEnterprise.getWxEnterpriseId() ;
}
}else {
wxEnterpriseId = wxApplication.getWxEnterpriseId();
}
return wxEnterpriseId ;
}
@Override
public void dealWxMessage(String param) {
QywxCallBackDTO dto = JSON.parseObject(param, QywxCallBackDTO.class);
......@@ -174,12 +188,11 @@ public class MessageApiServiceImpl implements MessageApiService {
log.info("通讯录只处理自建应用回调 dto={}", JSON.toJSONString(param));
return;
}
TabHaobanWxApplication wxApplication = wxApplicationService.selectByCorpId(dto.getAuthCorpId());
if (Objects.isNull(wxApplication)) {
String wxEnterpriseId = this.getWxEnterpriseId(dto.getAuthCorpId()) ;
if(null == wxEnterpriseId) {
log.info("授权企业不存在,{}", dto.getAuthCorpId());
return;
}
String wxEnterpriseId = wxApplication.getWxEnterpriseId();
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
if(qwDTO.isSelf() && dto.getSelfCallback()==0) {
log.info("非自建应用回调");
......@@ -448,12 +461,11 @@ public class MessageApiServiceImpl implements MessageApiService {
String authCorpId = qywxCallBackDTO.getAuthCorpId();
DepartmentDTO departmentDTO = new DepartmentDTO();
departmentDTO.setIsStore(0);
TabHaobanWxApplication wxApplication = wxApplicationService.selectByCorpId(authCorpId);
if (Objects.isNull(wxApplication)) {
log.info("授权企业不存在,{}", qywxCallBackDTO.getAuthCorpId());
String wxEnterpriseId = this.getWxEnterpriseId(authCorpId) ;
if(null == wxEnterpriseId) {
log.info("授权企业不存在,{}", authCorpId);
return;
}
String wxEnterpriseId = wxApplication.getWxEnterpriseId();
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(wxEnterpriseId,
SecretTypeEnum.CUSTOMIZED_APP.getVal());
......
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