fix 修复 多租户相同账号登录失败问题

This commit is contained in:
疯狂的狮子li
2023-03-02 10:32:04 +08:00
parent 4b814886b2
commit 37794b5738
3 changed files with 38 additions and 1 deletions

View File

@ -216,6 +216,9 @@ public class SysLoginService {
log.info("登录用户:{} 已被停用.", username);
throw new UserException("user.blocked", username);
}
if (TenantHelper.isEnable()) {
return userMapper.selectTenantUserByUserName(username, tenantId);
}
return userMapper.selectUserByUserName(username);
}
@ -231,6 +234,9 @@ public class SysLoginService {
log.info("登录用户:{} 已被停用.", phonenumber);
throw new UserException("user.blocked", phonenumber);
}
if (TenantHelper.isEnable()) {
return userMapper.selectTenantUserByPhonenumber(phonenumber, tenantId);
}
return userMapper.selectUserByPhonenumber(phonenumber);
}