Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
236a1909
Unverified
Commit
236a1909
authored
Mar 26, 2024
by
luoshangjie
Committed by
GitHub
Mar 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix][Admin] Fix the null pointer exception in the user list of the role (#3327)
Co-authored-by:
luoshangjie
<
luoshangjie@yfpharmacy.com
>
parent
0eec1d43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
RoleServiceImpl.java
...src/main/java/org/dinky/service/impl/RoleServiceImpl.java
+7
-1
No files found.
dinky-admin/src/main/java/org/dinky/service/impl/RoleServiceImpl.java
View file @
236a1909
...
@@ -41,6 +41,7 @@ import java.util.ArrayList;
...
@@ -41,6 +41,7 @@ import java.util.ArrayList;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -180,7 +181,12 @@ public class RoleServiceImpl extends SuperServiceImpl<RoleMapper, Role> implemen
...
@@ -180,7 +181,12 @@ public class RoleServiceImpl extends SuperServiceImpl<RoleMapper, Role> implemen
List
<
User
>
userList
=
new
ArrayList
<>();
List
<
User
>
userList
=
new
ArrayList
<>();
if
(
Asserts
.
isNotNull
(
userRoleList
))
{
if
(
Asserts
.
isNotNull
(
userRoleList
))
{
userRoleList
.
forEach
(
userRole
->
userList
.
add
(
userService
.
getById
(
userRole
.
getUserId
())));
userRoleList
.
forEach
(
userRole
->
{
User
user
=
userService
.
getById
(
userRole
.
getUserId
());
if
(
Objects
.
nonNull
(
user
))
{
userList
.
add
(
user
);
}
});
}
}
return
userList
;
return
userList
;
}
}
...
...
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