From c27aa4981b9635802accca8b56d56d89d5b8b371 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 22 八月 2023 11:33:22 +0800
Subject: [PATCH] 平台端新需求
---
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