Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
cash-loan-flow-boss
Commits
60ddfd96
Commit
60ddfd96
authored
Dec 07, 2020
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update user role
parent
c945fd97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
UserServiceImpl.java
...up/cashloanflowboss/api/user/service/UserServiceImpl.java
+2
-3
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/user/service/UserServiceImpl.java
View file @
60ddfd96
...
...
@@ -284,13 +284,12 @@ public class UserServiceImpl implements UserService {
}
Long
roleId
=
userModelVo
.
getRoleId
();
Role
role
=
null
;
if
(
roleId
!=
null
)
{
if
(!
roleRepository
.
exists
(
roleId
))
{
log
.
error
(
"{},不存在对应的角色 roleId={}"
,
LOG_PRE
,
roleId
);
return
Result
.
buildFail
(
"不存在对应的角色"
);
}
role
=
roleRepository
.
getOne
(
roleId
);
Role
role
=
roleRepository
.
getOne
(
roleId
);
if
(
roleId
==
1L
)
{
// 将普通用户设置成超级管理,需要级联设置用户级别
exist
.
setRank
(
UserRank
.
SUPER_ADMINISTRATOR
);
...
...
@@ -300,6 +299,7 @@ public class UserServiceImpl implements UserService {
exist
.
setRank
(
UserRank
.
OPERATOR
);
}
}
exist
.
setRoles
(
Collections
.
singletonList
(
role
));
}
Long
channelId
=
exist
.
getChannelId
();
...
...
@@ -314,7 +314,6 @@ public class UserServiceImpl implements UserService {
exist
.
setChannelName
(
configuration
.
getChannelName
());
}
exist
.
setRoles
(
Collections
.
singletonList
(
role
));
exist
.
setUpdateTime
(
new
Date
());
userRepository
.
save
(
exist
);
return
Result
.
buildSuccess
(
true
);
...
...
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