@Service public class MenuService extends Object
| 构造器和说明 |
|---|
MenuService() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
formatByApp(List<Map<String,Object>> menuList)
对传入的菜单列表中的每条记录进行格式化处理,
替换其中的应用UUID和模块UUID为对应名称或详细信息。
|
Map<String,Map<String,String>> |
list()
获取所有菜单信息并按模块分组。
|
List<Map<String,Object>> |
list(long userId)
根据用户ID查询其所具有的菜单权限列表,并根据多个应用的情况动态插入虚拟菜单项来支持多应用展示。
|
List<Map<String,Object>> |
listByApp(String uuid)
根据应用UUID获取该应用下的菜单列表,并进行格式化处理。
|
List<Map<String,Object>> |
tree(long userId)
根据指定用户ID获取其拥有的菜单权限,并构建成树形结构返回。
|
@Comment(value="\u6839\u636e\u5e94\u7528\u83b7\u53d6\u83dc\u5355\u5217\u8868") public List<Map<String,Object>> listByApp(String uuid) throws SQLException
uuid - 应用的唯一标识符(UUID)SQLException - 数据库查询异常时抛出public Map<String,Map<String,String>> list()
public void formatByApp(List<Map<String,Object>> menuList) throws SQLException
menuList - 待格式化的菜单列表,每个元素是一个包含菜单字段的MapSQLException - 如果在访问数据库过程中发生错误则抛出此异常@Comment(value="\u6839\u636e\u7528\u6237\u83b7\u53d6\u83dc\u5355\u5e76\u8f6c\u6210\u6811\u578b") public List<Map<String,Object>> tree(long userId) throws SQLException
userId - 用户的唯一标识符SQLException - 查询数据库失败时抛出@Comment(value="\u6839\u636e\u7528\u6237\u83b7\u53d6\u83dc\u5355\u5217\u8868") public List<Map<String,Object>> list(long userId) throws SQLException
userId - 指定用户的唯一标识符SQLException - 若执行SQL语句出错则抛出Copyright © 2026. All rights reserved.