feat: 权限缓存加载适配

This commit is contained in:
Ray.Hao
2025-12-12 22:26:43 +08:00
parent 0a594e2ce1
commit 3f05f77351
15 changed files with 210 additions and 91 deletions

View File

@@ -46,7 +46,6 @@ public class AuthController {
private final UserService userService;
private final TenantService tenantService;
private final TenantProperties tenantProperties;
private final PasswordEncoder passwordEncoder;
@Operation(summary = "获取验证码")
@GetMapping("/captcha")
@@ -75,8 +74,8 @@ public class AuthController {
return Result.success(authenticationToken);
}
// 多租户模式未指定租户ID查询该用户名在所有租户下的记录
List<User> users = userService.listUsersByUsername(username);
// 多租户模式未指定租户ID查询该用户名在所有租户下的账户
List<User> users = userService.findUserAcrossAllTenants(username);
if (users.isEmpty()) {
return Result.failed("用户不存在");