Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
a95ddc22
Commit
a95ddc22
authored
Sep 06, 2024
by
yanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 添加查询登录用户的部门及下属部门,主要用于下拉列表
parent
7f6927d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
DeptController.http
...o/module/system/controller/admin/dept/DeptController.http
+4
-0
DeptController.java
...o/module/system/controller/admin/dept/DeptController.java
+5
-1
No files found.
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.http
0 → 100644
View file @
a95ddc22
### list
GET {{baseUrl}}/system/dept/list-my-and-under-simple
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java
View file @
a95ddc22
...
...
@@ -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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment