Commit a95ddc22 authored by yanghao's avatar yanghao

chore: 添加查询登录用户的部门及下属部门,主要用于下拉列表

parent 7f6927d7
### list
GET {{baseUrl}}/system/dept/list-my-and-under-simple
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
......@@ -96,7 +96,11 @@ public class DeptController {
DeptListReqVO reqVO = new DeptListReqVO();
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
List<DeptDO> list = deptService.getDeptsByParentIdFromCache(loginUser.getDeptId(), true);
Long deptId = loginUser.getDeptId();
List<DeptDO> list = deptService.getDeptsByParentIdFromCache(deptId, true);
DeptDO dept = deptService.getDept(deptId);
list.add(dept);
// 排序后,返回给前端
list.sort(Comparator.comparing(DeptDO::getSort));
return success(DeptConvert.INSTANCE.convertList02(list));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment