Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
d8077043
Commit
d8077043
authored
Mar 12, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、角色含超级管理员时,设置用户superAdmin true
parent
4ef494ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
UserAccountServiceImpl.java
...pwc/taxtech/atms/service/impl/UserAccountServiceImpl.java
+3
-0
UserServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
+3
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserAccountServiceImpl.java
View file @
d8077043
...
...
@@ -296,6 +296,9 @@ public class UserAccountServiceImpl extends AbstractService {
User
user
=
CommonUtils
.
copyProperties
(
userAndUserRoleSaveDto
,
new
User
());
// 根据cs代码的mapper方法初始化user的isAdmin值
user
.
setIsAdmin
(
BooleanUtils
.
isTrue
(
userAndUserRoleSaveDto
.
getIsAdmin
()));
if
(
userAndUserRoleSaveDto
.
getRoleNames
().
contains
(
"超级管理员"
)){
user
.
setIsSuperAdmin
(
true
);
}
user
.
setId
(
CommonUtils
.
getUUID
());
user
.
setStatus
(
UserStatus
.
Active
.
value
());
// loginType:{1:AD认证,2:用户名密码登录验证,3:外部用户登录,使用Email和密码登录,因为目前没有选择登录类型,所以直接设置为3,全部使用密码验证,以后根据需求变更}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
View file @
d8077043
...
...
@@ -790,6 +790,9 @@ public class UserServiceImpl extends AbstractService {
user
.
setUserName
(
userDto
.
getUserName
());
user
.
setEmail
(
userDto
.
getEmail
());
user
.
setIsAdmin
(
BooleanUtils
.
isTrue
(
userDto
.
getIsAdmin
()));
if
(
userDto
.
getRoleNames
().
contains
(
"超级管理员"
)){
user
.
setIsSuperAdmin
(
true
);
}
user
.
setOrganizationId
(
userDto
.
getOrganizationId
());
user
.
setUpdateTime
(
new
Date
());
List
<
UserRole
>
oldUserRoleList
=
findUserRoleByUserIdWithoutProjectId
(
user
.
getId
());
...
...
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