Commit 2c32fc6f by 徐高华

test

parent 79ee9708
...@@ -13,7 +13,6 @@ public class WxEnterpriseDTO implements Serializable { ...@@ -13,7 +13,6 @@ public class WxEnterpriseDTO implements Serializable {
private String permanentCode; private String permanentCode;
// 业务中请不要使用此属性 // 业务中请不要使用此属性
private String corpid ;
private String corpName; private String corpName;
private String corpType; private String corpType;
...@@ -110,14 +109,6 @@ public class WxEnterpriseDTO implements Serializable { ...@@ -110,14 +109,6 @@ public class WxEnterpriseDTO implements Serializable {
private String wxCorpid ; private String wxCorpid ;
private String openCorpid ; private String openCorpid ;
public String getCorpid() {
return corpid;
}
public void setCorpid(String corpid) {
this.corpid = corpid;
}
public Integer getWxSecurityType() { public Integer getWxSecurityType() {
return wxSecurityType; return wxSecurityType;
} }
......
...@@ -67,6 +67,7 @@ import com.gic.haoban.manage.web.vo.EnterpriseDetailVO; ...@@ -67,6 +67,7 @@ import com.gic.haoban.manage.web.vo.EnterpriseDetailVO;
import com.gic.haoban.manage.web.vo.EnterpriseSearchVO; import com.gic.haoban.manage.web.vo.EnterpriseSearchVO;
import com.gic.haoban.manage.web.vo.SecretSettingVO; import com.gic.haoban.manage.web.vo.SecretSettingVO;
import com.gic.haoban.manage.web.vo.StoreVo; import com.gic.haoban.manage.web.vo.StoreVo;
import com.gic.haoban.manage.web.vo.WxEnterpriseVO;
import com.gic.redis.data.util.RedisUtil; import com.gic.redis.data.util.RedisUtil;
import com.gic.wechat.api.service.qywx.QywxCorpApiService; import com.gic.wechat.api.service.qywx.QywxCorpApiService;
import com.gic.wechat.token.api.dto.QywxCorpInfoDTO; import com.gic.wechat.token.api.dto.QywxCorpInfoDTO;
...@@ -166,7 +167,8 @@ public class WxEnterpriseController extends WebBaseController { ...@@ -166,7 +167,8 @@ public class WxEnterpriseController extends WebBaseController {
} }
wxEnterpriseDTO.setSmallVersion("免费版"); wxEnterpriseDTO.setSmallVersion("免费版");
wxEnterpriseDTO.setStoreTotal(departmentApiService.totalStoreCountByEnterpriseId(wxEnterpriseId)); wxEnterpriseDTO.setStoreTotal(departmentApiService.totalStoreCountByEnterpriseId(wxEnterpriseId));
wxEnterpriseDTO.setCorpid(getCorpid(wxEnterpriseDTO)); WxEnterpriseVO vo = com.gic.commons.util.EntityUtil.changeEntityNew( WxEnterpriseVO.class, wxEnterpriseDTO) ;
vo.setCorpid(getCorpid(wxEnterpriseDTO));
return resultResponse(HaoBanErrCode.ERR_1, wxEnterpriseDTO); return resultResponse(HaoBanErrCode.ERR_1, wxEnterpriseDTO);
} }
...@@ -198,7 +200,8 @@ public class WxEnterpriseController extends WebBaseController { ...@@ -198,7 +200,8 @@ public class WxEnterpriseController extends WebBaseController {
wxDTO.setContactFlag(1); wxDTO.setContactFlag(1);
} }
wxEnterpriseApiService.update(wxDTO); wxEnterpriseApiService.update(wxDTO);
wxEnterpriseDTO.setCorpid(getCorpid(wxEnterpriseDTO)); WxEnterpriseVO vo = com.gic.commons.util.EntityUtil.changeEntityNew( WxEnterpriseVO.class, wxEnterpriseDTO) ;
vo.setCorpid(getCorpid(wxEnterpriseDTO));
return resultResponse(HaoBanErrCode.ERR_1, wxEnterpriseDTO); return resultResponse(HaoBanErrCode.ERR_1, wxEnterpriseDTO);
} }
......
...@@ -335,7 +335,7 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -335,7 +335,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
return resultResponse(HaoBanErrCode.ERR_500001); return resultResponse(HaoBanErrCode.ERR_500001);
} }
String wxEnterpriseId = enterpriseDTO.getWxEnterpriseId(); String wxEnterpriseId = enterpriseDTO.getWxEnterpriseId();
logger.info("查询到的企微ID={}", wxEnterpriseId); logger.info("查询到的企微ID={}-{}", wxEnterpriseId,enterpriseDTO.getCorpName());
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseApiService.getQwInfo(wxEnterpriseId) ; WxEnterpriseQwDTO qwDTO = this.wxEnterpriseApiService.getQwInfo(wxEnterpriseId) ;
MemberLoginQo user = new MemberLoginQo(); MemberLoginQo user = new MemberLoginQo();
if (StringUtils.isBlank(qo.getUserId())) { if (StringUtils.isBlank(qo.getUserId())) {
...@@ -344,14 +344,13 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -344,14 +344,13 @@ public class WxEnterpriseInfoController extends WebBaseController {
logger.info("登录失败,从微信获取用户信息失败"); logger.info("登录失败,从微信获取用户信息失败");
return resultResponse(HaoBanErrCode.ERR_6); return resultResponse(HaoBanErrCode.ERR_6);
} }
if (!user.getCorpId().equals(enterpriseDTO.getCorpid()) && !user.getCorpId().equals(enterpriseDTO.getOpenCorpid())) { if (!user.getCorpId().equals(enterpriseDTO.getWxCorpid()) && !user.getCorpId().equals(enterpriseDTO.getOpenCorpid())) {
logger.info("corpid不一致,{},{},{}",user.getCorpId(),enterpriseDTO.getCorpid(),enterpriseDTO.getOpenCorpid()); logger.info("corpid不一致,{},{},{}",user.getCorpId(),enterpriseDTO.getWxCorpid(),enterpriseDTO.getOpenCorpid());
return resultResponse(HaoBanErrCode.ERR_500003, user.getCorpId()); return resultResponse(HaoBanErrCode.ERR_500003, user.getCorpId());
} }
WxApplicationDTO wxApplicationDTO = wxApplicationApiService.selectByCorpid(user.getCorpId()); enterpriseDTO = wxEnterpriseApiService.getEnterpriseBycorpId(qo.getCorpId());
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseApiService.getOne(wxApplicationDTO.getWxEnterpriseId()); if (enterpriseDTO == null) {
if (wxEnterpriseDTO == null) { logger.info("该企业不存在corpid={},{}", user.getCorpId());
logger.info("该企业不存在corpid={},{}", user.getCorpId(), wxApplicationDTO.getWxEnterpriseId());
return resultResponse(HaoBanErrCode.ERR_400002); return resultResponse(HaoBanErrCode.ERR_400002);
} }
} else { } else {
......
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