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 { // 获取用户权限