Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
d6bd1d97
Commit
d6bd1d97
authored
Apr 22, 2020
by
ZhengJie
Browse files
Merge 2.5dev
parents
1f856a1d
286a4836
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java
View file @
d6bd1d97
...
@@ -91,8 +91,8 @@ public class UserServiceImpl implements UserService {
...
@@ -91,8 +91,8 @@ public class UserServiceImpl implements UserService {
public
void
update
(
User
resources
)
{
public
void
update
(
User
resources
)
{
User
user
=
userRepository
.
findById
(
resources
.
getId
()).
orElseGet
(
User:
:
new
);
User
user
=
userRepository
.
findById
(
resources
.
getId
()).
orElseGet
(
User:
:
new
);
ValidationUtil
.
isNull
(
user
.
getId
(),
"User"
,
"id"
,
resources
.
getId
());
ValidationUtil
.
isNull
(
user
.
getId
(),
"User"
,
"id"
,
resources
.
getId
());
User
user1
=
userRepository
.
findByUsername
(
user
.
getUsername
());
User
user1
=
userRepository
.
findByUsername
(
resources
.
getUsername
());
User
user2
=
userRepository
.
findByEmail
(
user
.
getEmail
());
User
user2
=
userRepository
.
findByEmail
(
resources
.
getEmail
());
if
(
user1
!=
null
&&!
user
.
getId
().
equals
(
user1
.
getId
())){
if
(
user1
!=
null
&&!
user
.
getId
().
equals
(
user1
.
getId
())){
throw
new
EntityExistException
(
User
.
class
,
"username"
,
resources
.
getUsername
());
throw
new
EntityExistException
(
User
.
class
,
"username"
,
resources
.
getUsername
());
...
...
Write
Preview
Supports
Markdown
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