From a8c03746e6bd8ac1d46dc48c1b10bceff543664f Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 10 十二月 2024 20:16:12 +0800
Subject: [PATCH] ll
---
server/system_service/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/server/system_service/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java b/server/system_service/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java
index f698a75..7f344ed 100644
--- a/server/system_service/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java
+++ b/server/system_service/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java
@@ -290,6 +290,22 @@
if (user == null) {
throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT);
}
+ //娉ㄥ唽鍙告満/鍔冲姟浜哄憳
+ if((Constants.equalsInteger(user.getType(),Constants.ZERO)||Constants.equalsInteger(user.getType(),Constants.TWO)) && Objects.nonNull(user.getMemberId())){
+ if(Constants.equalsInteger(user.getType(),Constants.TWO)){
+ if(Objects.isNull(user.getCompanyId())){
+ throw new BusinessException(ResponseStatus.NO_ALLOW_LOGIN);
+ }
+ Company company = companyMapper.selectById(user.getCompanyId());
+ if(Objects.isNull(company) || Constants.equalsInteger(company.getType(),Constants.ONE)){
+ throw new BusinessException(ResponseStatus.NO_ALLOW_LOGIN);
+ }
+ }
+ }else{
+ throw new BusinessException(ResponseStatus.NO_ALLOW_LOGIN);
+ }
+
+
String pwd = Utils.Secure.encryptPassword(new String(dto.getPassword()), user.getSalt());
// 姣旇緝瀵嗙爜
if( !StringUtils.equals(pwd, user.getPassword())){
--
Gitblit v1.9.3