Commit 2c32fc6f by 徐高华

test

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