Commit a3a377d4 by 徐高华

好办提审测试账号

parent a4a73c0d
......@@ -79,6 +79,7 @@ import com.gic.haoban.manage.web.vo.MemberSendMessageVo;
import com.gic.haoban.manage.web.vo.StoreMemberVO;
import com.gic.haoban.manage.web.vo.WellDoneLoginInfoVO;
import com.gic.member.api.service.MemberOpenCardBusinessService;
import com.gic.redis.data.util.RedisUtil;
import com.gic.wechat.api.dto.qywx.UserDTO;
import com.gic.wechat.api.service.qywx.QywxCorpApiService;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
......@@ -149,6 +150,25 @@ public class WxEnterpriseInfoController extends WebBaseController {
}
String userId = user.getUserid();
String corpId = user.getCorpid();
WxEnterpriseDTO wxEnterprise = wxEnterpriseApiService.getEnterpriseBycorpId(corpId);
boolean testFlag = false ;
if(null == wxEnterprise) {
logger.info("通过corpid查不到企业corpid={}",corpId);
testFlag = true ;
}
if(!testFlag) {
List<WxEnterpriseDTO> relationList = wxEnterpriseRelatedApiService.listWxEnterpriseByEid(wxEnterprise.getWxEnterpriseId());
if(CollectionUtils.isEmpty(relationList)) {
logger.info("企业未关联gic商户,corpid={}",corpId);
testFlag = true ;
}
}
if(testFlag) {
Object testAccount = RedisUtil.getCache("haoban-test-account") ;
if(null != testAccount) {
return resultResponse(HaoBanErrCode.ERR_1, JSON.parseObject(testAccount.toString()));
}
}
// 判断好办是否到期
ServiceResponse<Boolean> resp = this.wxEnterpriseApiService.isStopHaoban(corpId);
if (!resp.isSuccess()) {
......@@ -157,15 +177,18 @@ public class WxEnterpriseInfoController extends WebBaseController {
response.setMessage(resp.getMessage());
return response;
}
WxEnterpriseDTO enterprise = wxEnterpriseApiService.getEnterpriseBycorpId(corpId);
StaffDTO loginStaff = null;
if (enterprise != null) {
loginStaff = staffApiService.getByUserIdAndReflushWhenNoPhone(userId, enterprise.getWxEnterpriseId());
if (wxEnterprise != null) {
loginStaff = staffApiService.getByUserIdAndReflushWhenNoPhone(userId, wxEnterprise.getWxEnterpriseId());
if (loginStaff == null) {
staffApiService.wxGetAdd(userId, enterprise.getWxEnterpriseId());
loginStaff = staffApiService.selectByUserIdAndEnterpriseId(userId, enterprise.getWxEnterpriseId());
staffApiService.wxGetAdd(userId, wxEnterprise.getWxEnterpriseId());
loginStaff = staffApiService.selectByUserIdAndEnterpriseId(userId, wxEnterprise.getWxEnterpriseId());
}
}
if (loginStaff == null) {
logger.info("游客用户");
WellDoneLoginInfoVO wellDoneLoginInfoVo = new WellDoneLoginInfoVO();
......
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