feat(dept): 添加根据部门ID查询所有子部门功能
- 在 ISysDeptService 中新增 selectChildDeptsById 方法定义 - 在 SysDeptController 中新增 listWithChildren 接口用于查询部门及子部门 - 在 SysDeptServiceImpl 中实现 selectChildDeptsById 方法,使用 ancestors 字段递归查询 - 使用注解权限控制确保接口安全性 - 返回完整的部门树形结构数据
This commit is contained in:
@@ -113,4 +113,12 @@ public interface ISysDeptService {
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDeptById(Long deptId);
|
||||
|
||||
/**
|
||||
* 根据部门ID查询所有子部门(递归)
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
* @return 所有子部门列表
|
||||
*/
|
||||
List<SysDept> selectChildDeptsById(Long deptId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user