DeptServiceGetSelfAndParentsIds Method
获取指定子部门及其所有父部门 的 Id。
Namespace: QuickAdmin.Service.AdminAssembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 2.0.10
public virtual IList<long> GetSelfAndParentsIds(
long childId,
int? maxUpLevel = null
)
- childId long
- 子部门 Id。
- maxUpLevel int? (Optional)
-
指示最高反向查询到子部门的第几级父部门,从 1 开始,1 表示到其直接父部门,2 表示到其父部门的父部门,以此类推。
null 表示一直查询到根部门。
IListlongId 列表,
childId 位于列表尾部,其上侧依次为其递归父部门
Id。
childId 对应部门不存在时,将返回一个空列表。
IDeptServiceGetSelfAndParentsIds(long, int?)
将从 childId 开始,反向递归查询其父部门。