修复:账号删除后依然能登录

This commit is contained in:
SillyBoy
2025-02-19 10:44:13 +08:00
parent 8d635bb80b
commit c4b95654fe
2 changed files with 18 additions and 0 deletions

View File

@@ -168,6 +168,11 @@ public class LoginService implements StpInterface {
}
// 验证账号状态
if (employeeEntity.getDeletedFlag()) {
saveLoginLog(employeeEntity, ip, userAgent, "账号已删除", LoginLogResultEnum.LOGIN_FAIL);
return ResponseDTO.userErrorParam("您的账号已被删除,请联系工作人员!");
}
if (employeeEntity.getDisabledFlag()) {
saveLoginLog(employeeEntity, ip, userAgent, "账号已禁用", LoginLogResultEnum.LOGIN_FAIL);
return ResponseDTO.userErrorParam("您的账号已被禁用,请联系工作人员!");
@@ -510,6 +515,10 @@ public class LoginService implements StpInterface {
}
// 验证账号状态
if (employeeEntity.getDeletedFlag()) {
return ResponseDTO.userErrorParam("您的账号已被删除,请联系工作人员!");
}
if (employeeEntity.getDisabledFlag()) {
return ResponseDTO.userErrorParam("您的账号已被禁用,请联系工作人员!");
}