Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jeecg-boot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
jeecg-boot
Commits
c767f094
Commit
c767f094
authored
Nov 06, 2021
by
zhangdaiscott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的部门下面的用户分配角色报错(无角色的情况下)
parent
42e0a938
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java
+4
-1
No files found.
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartRoleController.java
View file @
c767f094
...
...
@@ -205,7 +205,10 @@ public class SysDepartRoleController extends JeecgController<SysDepartRole, ISys
List
<
SysDepartRole
>
roleList
=
sysDepartRoleService
.
list
(
new
QueryWrapper
<
SysDepartRole
>().
eq
(
"depart_id"
,
departId
));
List
<
String
>
roleIds
=
roleList
.
stream
().
map
(
SysDepartRole:
:
getId
).
collect
(
Collectors
.
toList
());
//根据角色id,用户id查询已授权角色
List
<
SysDepartRoleUser
>
roleUserList
=
departRoleUserService
.
list
(
new
QueryWrapper
<
SysDepartRoleUser
>().
eq
(
"user_id"
,
userId
).
in
(
"drole_id"
,
roleIds
));
List
<
SysDepartRoleUser
>
roleUserList
=
null
;
if
(
roleIds
!=
null
&&
roleIds
.
size
()>
0
){
roleUserList
=
departRoleUserService
.
list
(
new
QueryWrapper
<
SysDepartRoleUser
>().
eq
(
"user_id"
,
userId
).
in
(
"drole_id"
,
roleIds
));
}
result
.
setSuccess
(
true
);
result
.
setResult
(
roleUserList
);
return
result
;
...
...
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