Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
Overview
Overview
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
base_platform_enterprise
gic-platform-auth
Commits
de20f8d0
Commit
de20f8d0
authored
Oct 10, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增超级管理员接口
parent
12cb2c54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
UserApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/UserApiServiceImpl.java
+25
-0
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/UserApiServiceImpl.java
View file @
de20f8d0
...
...
@@ -114,6 +114,31 @@ public class UserApiServiceImpl implements UserApiService {
}
}
@Override
public
ServiceResponse
<
Integer
>
saveAdmin
(
UserDTO
userDTO
)
{
//valid param
ServiceResponse
paramResult
=
ValidUtil
.
allCheckValidate
(
userDTO
,
UserDTO
.
SaveUserValid
.
class
);
if
(!
paramResult
.
isSuccess
())
{
return
paramResult
;
}
if
(
userService
.
isPhoneRepeat
(
null
,
userDTO
.
getPhoneNumber
(),
userDTO
.
getEnterpriseId
()))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"手机号码不能重复"
);
}
if
(
userDTO
.
getPasswordType
()
==
null
)
{
//默认自定义创建密码类型
userDTO
.
setPasswordType
(
2
);
}
if
(
StringUtils
.
isBlank
(
userDTO
.
getPhoneAreaCode
()))
{
userDTO
.
setPhoneAreaCode
(
"86"
);
}
userDTO
.
setCreateTime
(
new
Date
());
userDTO
.
setUpdateTime
(
new
Date
());
userDTO
.
setStatus
(
1
);
Integer
userId
=
userService
.
saveUser
(
userDTO
);
return
ServiceResponse
.
success
(
userId
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
ServiceResponse
editUser
(
UserDTO
userDTO
)
{
...
...
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