Commit 8de2644d by 徐高华

Merge branch 'feature/社群' into 'master'

Feature/社群

See merge request !845
parents fa00f428 0aa4f720
......@@ -45,6 +45,7 @@ import com.gic.haoban.common.anno.IgnoreLogin;
import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.ClerkMainStoreRelatedDTO;
import com.gic.haoban.manage.api.dto.EnterpriseDetailDTO;
import com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO;
import com.gic.haoban.manage.api.dto.ExternalUserDTO;
import com.gic.haoban.manage.api.dto.MemberStoreDTO;
......@@ -79,6 +80,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 +151,26 @@ 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<EnterpriseDetailDTO> relationList = wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId(wxEnterprise.getWxEnterpriseId());
if(CollectionUtils.isEmpty(relationList)) {
logger.info("企业未关联gic商户,corpid={}",corpId);
testFlag = true ;
}
}
if(testFlag) {
Object testAccount = RedisUtil.getCache("haoban-test-account") ;
logger.info("testAccount={}",testAccount);
if(null != testAccount) {
return resultResponse(HaoBanErrCode.ERR_1, JSON.parseObject((String) testAccount));
}
}
// 判断好办是否到期
ServiceResponse<Boolean> resp = this.wxEnterpriseApiService.isStopHaoban(corpId);
if (!resp.isSuccess()) {
......@@ -157,15 +179,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