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
37774e4f
Commit
37774e4f
authored
Jul 22, 2020
by
suntao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'features/mo'
* features/mo: 如果将普通用户改成超级管理 bug
parents
96956a91
051ea822
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
UserController.java
.../cashloanflowboss/api/user/controller/UserController.java
+4
-4
UserServiceImpl.java
...up/cashloanflowboss/api/user/service/UserServiceImpl.java
+5
-1
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/user/controller/UserController.java
View file @
37774e4f
...
...
@@ -146,14 +146,14 @@ public class UserController {
* @return
*/
//
@Security(authorityId = "User.add")
@Security
(
authorityId
=
"User.add"
)
@PostMapping
(
value
=
"/add"
)
public
Result
<
Boolean
>
addUser
(
@RequestBody
@Valid
UserModelVo
userModelVo
)
{
return
userService
.
addUser
(
userModelVo
);
}
@PutMapping
(
"/modify"
)
//
@Security(authorityId = "User.update")
@Security
(
authorityId
=
"User.update"
)
public
Result
<
Boolean
>
modifyUser
(
@RequestBody
@Valid
UserModelVo
userModelVo
)
{
return
userService
.
modifyUser
(
userModelVo
);
}
...
...
@@ -165,7 +165,7 @@ public class UserController {
* @return
*/
@GetMapping
(
"/list/get"
)
//
@Security(authorityId = "User.list")
@Security
(
authorityId
=
"User.list"
)
public
Result
<
Page
<
User
>>
UserList
(
@Valid
QueryUserListModel
queryUserListModel
)
{
return
userService
.
getUserList
(
queryUserListModel
);
}
...
...
@@ -193,7 +193,7 @@ public class UserController {
}
@PutMapping
(
"/update/password"
)
//
@Security(authorityId = "User.update")
@Security
(
authorityId
=
"User.update"
)
public
Result
<
Boolean
>
modifyUser
(
@RequestBody
@Valid
UpdatePasswordParam
param
)
{
return
userService
.
updatePassword
(
param
);
}
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/user/service/UserServiceImpl.java
View file @
37774e4f
...
...
@@ -3,6 +3,7 @@ package cn.quantgroup.cashloanflowboss.api.user.service;
import
cn.quantgroup.cashloanflowboss.api.login.model.Principal
;
import
cn.quantgroup.cashloanflowboss.api.role.entity.Role
;
import
cn.quantgroup.cashloanflowboss.api.role.repository.RoleRepository
;
import
cn.quantgroup.cashloanflowboss.api.user.dictionary.UserRank
;
import
cn.quantgroup.cashloanflowboss.api.user.dictionary.UserStatus
;
import
cn.quantgroup.cashloanflowboss.api.user.entity.User
;
import
cn.quantgroup.cashloanflowboss.api.user.model.*
;
...
...
@@ -300,7 +301,10 @@ public class UserServiceImpl implements UserService {
}
exist
.
setChannelName
(
configuration
.
getChannelName
());
}
if
(
roleId
==
1L
)
{
// 将普通用户设置成超级管理,需要级联设置用户级别
exist
.
setRank
(
UserRank
.
SUPER_ADMINISTRATOR
);
}
//exist.setPassword(MD5Tools.md5(userModelVo.getPassword()));
exist
.
setRoles
(
Collections
.
singletonList
(
role
));
exist
.
setUpdateTime
(
new
Date
());
...
...
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