Class RoleService
java.lang.Object
io.github.xezzon.zeroweb.role.internal.RoleService
- All Implemented Interfaces:
io.github.xezzon.zeroweb.core.tree.ITreeService<Role,String>, IRoleService4Auth
@Service
public class RoleService
extends Object
implements io.github.xezzon.zeroweb.core.tree.ITreeService<Role,String>, IRoleService4Auth
角色服务实现类
RoleService 提供角色管理的业务逻辑实现。
它同时实现了 ITreeService 以支持树形结构相关的查询,
以及 IRoleService4Auth 为认证模块提供角色相关服务。
- Author:
- xezzon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindByIdIn(Collection<String> roleIds) 根据ID批量查询角色findParent(String childId) 查询上级角色listByParentId(Collection<String> parentIds) topDownList(Collection<String> initial) 查询角色子级列表Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.xezzon.zeroweb.core.tree.ITreeService
topDownList, topDownTree
-
Constructor Details
-
RoleService
-
-
Method Details
-
listByParentId
-
findByIdIn
Description copied from interface:IRoleService4Auth根据ID批量查询角色- Specified by:
findByIdInin interfaceIRoleService4Auth- Parameters:
roleIds- 角色ID集合,不能为空- Returns:
- 角色列表,按照传入的ID顺序返回,如果角色不存在则跳过
-
findParent
Description copied from interface:IRoleService4Auth查询上级角色- Specified by:
findParentin interfaceIRoleService4Auth- Parameters:
childId- 角色ID,不能为空- Returns:
- 上级角色,如果角色不存在或为根节点则返回空
-
topDownList
Description copied from interface:IRoleService4Auth查询角色子级列表- Specified by:
topDownListin interfaceIRoleService4Auth- Parameters:
initial- 初始角色ID集合,从这些角色开始向下查找- Returns:
- 该角色的所有子级角色(包含递归子级,但不包括自身),按层级排序
-