From ff8b62e0872cdbaa7ebea244ca8f55f70c41e596 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期五, 20 十二月 2024 17:19:05 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/api/user/AdminUserApiImpl.java            |    2 ++
 iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/auth/AuthController.java |    8 +++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/api/user/AdminUserApiImpl.java b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/api/user/AdminUserApiImpl.java
index e951bd2..7eb1058 100644
--- a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/api/user/AdminUserApiImpl.java
+++ b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/api/user/AdminUserApiImpl.java
@@ -5,6 +5,7 @@
 import com.iailab.framework.common.pojo.CommonResult;
 import com.iailab.framework.common.util.object.BeanUtils;
 import com.iailab.framework.common.util.object.ConvertUtils;
+import com.iailab.framework.datapermission.core.annotation.DataPermission;
 import com.iailab.module.system.api.user.dto.AdminUserRespDTO;
 import com.iailab.module.system.controller.admin.user.vo.user.UserSaveReqVO;
 import com.iailab.module.system.dal.dataobject.dept.DeptDO;
@@ -34,6 +35,7 @@
     private PermissionService permissionService;
 
     @Override
+    @DataPermission(enable = false) // 关闭数据权限,避免只查看自己时,查询不到部门。
     public CommonResult<AdminUserRespDTO> getUser(Long id) {
         AdminUserDO user = userService.getUser(id);
         return success(BeanUtils.toBean(user, AdminUserRespDTO.class));
diff --git a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/auth/AuthController.java b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/auth/AuthController.java
index 2de4f9c..d2a3342 100644
--- a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/auth/AuthController.java
+++ b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/auth/AuthController.java
@@ -136,7 +136,7 @@
         Set<Long> menuIds = permissionService.getRoleMenuListByRoleId(convertSet(roles, RoleDO::getId));
         List<MenuDO> menuList = menuService.getMenuList(menuIds);
         menuList = menuService.filterDisableMenus(menuList);
-//        menuList = menuService.filterMenus(menuList, "system");
+        menuList = menuService.filterMenus(menuList, "system");
 
         // 2. 拼接结果返回
         return success(AuthConvert.INSTANCE.convert(user, roles, menuList));
@@ -239,7 +239,7 @@
         }
         children.retainAll(menuList);
         List<MenuDO> tempChildren = new LinkedList<>();
-        //为每一个二级菜单增加一个隐藏父级目录
+        //为每一个二级菜单(非外链菜单)增加一个隐藏父级目录
         children.stream().forEach(menu -> {
             if (menu.getParentId().equals(menuDO.getId())) {
                 if(menu.getType().equals(MenuTypeEnum.MENU.getType())) {
@@ -254,7 +254,9 @@
                     tempChildren.add(parentMenu);
                 } else if(menu.getType().equals(MenuTypeEnum.DIR.getType())) {
                     // 为应用菜单二级目录前增加“/”
-                    menu.setPath("/" + menu.getPath());
+                    if(!menu.getPath().contains("http:") && !menu.getPath().contains("https:")) {
+                        menu.setPath("/" + menu.getPath());
+                    }
                 }
             }
             tempChildren.add(menu);

--
Gitblit v1.9.3