src/main/java/com/ruoyi/common/utils/SecurityUtils.java
@@ -38,11 +38,11 @@ /** * 获取部门ID **/ public static Long getDeptId() public static Long [] getDeptId() { try { return getLoginUser().getDeptId(); return getLoginUser().getDeptIds(); } catch (Exception e) { @@ -121,7 +121,7 @@ */ public static boolean isAdmin(Long userId) { return userId != null && 1L == userId; return hasRole("普通2") ||hasRole("admin") || hasRole("最高1"); } /**