Commit 5f22f5a3 by 徐高华

Merge branch 'feature/自建应用验证' into 'developer'

自建调整

See merge request !1184
parents 6a96ca31 9320144c
......@@ -5,8 +5,8 @@ package com.gic.haoban.manage.api.enums;
*/
public enum SecretTypeEnum {
CONTACT_CUSTOMER(1, "顾客联系--自建"),
MEMBER_WAPP(4, "会员小程序"),
CONTACT_CUSTOMER(1, "自建(原顾客联系)"),
MEMBER_WAPP(4, "会员工具"),
CUSTOMIZED_APP(5, "自建代开发"),
WEWORK_PAY(6, "企业支付"),
;
......
......@@ -320,11 +320,18 @@ public class WxEnterpriseController extends WebBaseController {
if (CollectionUtils.isEmpty(secretTypeList)) {
return resultResponse(HaoBanErrCode.ERR_1, false);
}
if ((secretTypeList.contains(SecretTypeEnum.CUSTOMIZED_APP.getVal()))) {
return resultResponse(HaoBanErrCode.ERR_1, true);
} else {
return resultResponse(HaoBanErrCode.ERR_1, false);
// 如果是第三方校验待开发
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseApiService.getQwInfo(wxEnterpriseId) ;
if(qwDTO.isSelf()) {
if ((secretTypeList.contains(SecretTypeEnum.CONTACT_CUSTOMER.getVal()))) {
return resultResponse(HaoBanErrCode.ERR_1, true);
}
}else {
if ((secretTypeList.contains(SecretTypeEnum.CUSTOMIZED_APP.getVal()))) {
return resultResponse(HaoBanErrCode.ERR_1, true);
}
}
return resultResponse(HaoBanErrCode.ERR_1, false);
}
/**
......@@ -346,7 +353,7 @@ public class WxEnterpriseController extends WebBaseController {
}
wxSecretKey = wxSecretKey.trim();
String token = this.qywxCorpApiService.getToken(qwDTO.getDkCorpid(), wxSecretKey);
logger.info("查询token", token) ;
logger.info("查询token={}", token) ;
if(StringUtils.isEmpty(token) || token.length() < 10) {
return this.fail("请确认secret是否正确") ;
}
......
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