serv\web- 多租户修改

This commit is contained in:
2025-10-29 19:08:22 +08:00
parent c5c134fbb3
commit 82b6f14e64
86 changed files with 4446 additions and 2730 deletions

View File

@@ -3,6 +3,7 @@ package org.xyzh.auth.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.http.SessionCreationPolicy;
@@ -26,6 +27,7 @@ public class SecurityConfig {
@Autowired
private AuthProperties authProperties;
@Lazy
@Autowired
private JwtAuthenticationFilter jwtAuthenticationFilter;

View File

@@ -25,7 +25,7 @@ import org.xyzh.api.system.role.RoleService;
import org.xyzh.api.system.permission.PermissionService;
import org.xyzh.common.redis.service.RedisService;
import org.xyzh.api.system.menu.MenuService;
import org.xyzh.common.vo.DeptRoleVO;
import org.xyzh.common.vo.UserDeptRoleVO;
import java.util.Date;
import java.util.List;
@@ -206,9 +206,9 @@ public class LoginServiceImpl implements LoginService {
loginDomain.setIpAddress(ipAddress);
// 获取用户角色和权限(如果服务可用)
try {
ResultDomain<DeptRoleVO> resultDomain = roleService.getDeptRolesByUserId(user.getID());
ResultDomain<UserDeptRoleVO> resultDomain = roleService.getDeptRolesByUserId(user.getID());
if (resultDomain.isSuccess()) {
List<DeptRoleVO> roles = resultDomain.getDataList();
List<UserDeptRoleVO> roles = resultDomain.getDataList();
loginDomain.setRoles(roles);
} else {
loginDomain.setRoles(new ArrayList<>());