From 40609a1bd11ce79445562ac23f16af23a48c3933 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 18 八月 2023 14:34:28 +0800 Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmMes --- server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java b/server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java index 83c9733..9c3e70f 100644 --- a/server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java +++ b/server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java @@ -11,6 +11,7 @@ import doumeemes.core.utils.Constants; import doumeemes.core.utils.HttpsUtil; import doumeemes.core.utils.Utils; +import doumeemes.dao.business.model.Company; import doumeemes.dao.business.model.CompanyUser; import doumeemes.dao.business.model.Department; import doumeemes.dao.ext.CompanyExtMapper; @@ -69,6 +70,8 @@ @Autowired private SystemLoginLogService systemLoginLogService; + @Autowired + private CompanyExtMapper companyExtMapper; /** @@ -107,6 +110,11 @@ if(Objects.isNull(department)){ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌缁戝畾閮ㄩ棬淇℃伅"); } + Company company = companyExtMapper.selectById(department.getCompanyId()); + if(Objects.isNull(company)||company.getStatus().equals(Constants.ZERO)){ + wxLoginVO.setLoginStatus(Constants.ONE); + return wxLoginVO; + } SystemUser systemUser = systemUserMapper.selectById(companyUser.getUserId()); //鏌ヨ鐢ㄦ埛鏁版嵁 LoginDTO dto = new LoginDTO(); @@ -137,6 +145,9 @@ wxLoginVO.setLoginStatus(Constants.ZERO); wxLoginVO.setSession(session); return wxLoginVO; + }catch (BusinessException e) { + wxLoginVO.setLoginStatus(Constants.ONE); + return wxLoginVO; }catch (AuthenticationException e) { BusinessException ee = null; loginLog.setSuccess(Boolean.FALSE); -- Gitblit v1.9.3