fix: 优化逻辑
This commit is contained in:
parent
de480e3e19
commit
ebfd668d06
@ -68,7 +68,7 @@ public class LoginController {
|
||||
@PostMapping("/login")
|
||||
@Operation(summary = "登录用户")
|
||||
@ResponseBody
|
||||
public ResponseResult login(SysUser user) throws Exception {
|
||||
public ResponseResult login(SysUser user, @RequestHeader(value = "Tenant_id", required = false) String tenantId) throws Exception {
|
||||
// 密码解密
|
||||
String password = RsaUtils.decryptByPrivateKey(privateKey,
|
||||
user.getPassword());
|
||||
@ -100,6 +100,10 @@ public class LoginController {
|
||||
Integer status = loginUser.getUser().getStatus();
|
||||
String regStatus = loginUser.getUser().getRegStatus();
|
||||
|
||||
if (StrUtil.isNotBlank(tenantId)&&!tenantId.equals(loginUser.getUser().getTenantId())) {
|
||||
return ResponseResult.error("账号不存在或密码错误");
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(regStatus)&&"REJECTED".equals(regStatus)) {
|
||||
return ResponseResult.error("账号审核未通过");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user