From c16633143e4bd96fda3dc6da907f49f0d20e3dd3 Mon Sep 17 00:00:00 2001 From: zjh <15615273395@163.com> Date: Wed, 10 Dec 2025 14:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=BF=94=E5=9B=9E=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/UserPermissionGetter.java | 32 ++----------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/xdap/self_development/common/UserPermissionGetter.java b/src/main/java/com/xdap/self_development/common/UserPermissionGetter.java index c07f80f..3a92a57 100644 --- a/src/main/java/com/xdap/self_development/common/UserPermissionGetter.java +++ b/src/main/java/com/xdap/self_development/common/UserPermissionGetter.java @@ -22,36 +22,9 @@ public class UserPermissionGetter { @Resource private RuntimeAppContextService runtimeAppContextService; - // 获取子系统权限 - public List getSubsystemPermissions() { -// String currentUserId = runtimeAppContextService.getCurrentUserId(); - String currentUserId = "zjh"; - Set result = new HashSet<>(); - try { - // 获取用户权限 - result = modelRoleService.selectPersByUser(currentUserId) - .stream().map(MenuParamView::getSubsystem).collect(Collectors.toSet()); - // 获取用户所在部门权限 - List deptIds = businessDatabase.getBusinessDatabase() - .eq("user_id", currentUserId).doQuery(XdapDeptUsers.class) - .stream().map(XdapDeptUsers::getDepartmentId).collect(Collectors.toList()); - for (String deptId : deptIds) { - Set deptPermissions = modelRoleService.selectPersByUser(deptId) - .stream().map(MenuParamView::getSubsystem).collect(Collectors.toSet()); - result.addAll(deptPermissions); - } - - } - catch (Exception e) { - log.error(e.getMessage()); - } - return new ArrayList<>(result); - } - // 获取子系统下的参数权限 public List getParamPermissions(String subsystem) { -// String currentUserId = runtimeAppContextService.getCurrentUserId(); - String currentUserId = "zjh"; + String currentUserId = runtimeAppContextService.getCurrentUserId(); Set result = new HashSet<>(); try { // 获取用户权限 @@ -81,8 +54,7 @@ public class UserPermissionGetter { // 获取全部参数权限 public List getParamPermissions() { -// String currentUserId = runtimeAppContextService.getCurrentUserId(); - String currentUserId = "zjh"; + String currentUserId = runtimeAppContextService.getCurrentUserId(); Set result = new HashSet<>(); try { // 获取用户权限