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
d47ce16e
Commit
d47ce16e
authored
May 28, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
超级管理员不能转移
parent
f96fbd78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
AccountGroupController.java
...a/com/gic/auth/web/controller/AccountGroupController.java
+13
-4
No files found.
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/AccountGroupController.java
View file @
d47ce16e
...
...
@@ -6,7 +6,9 @@ import java.util.List;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
com.gic.auth.dto.*
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -19,10 +21,6 @@ import com.gic.api.base.commons.Page;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.constant.AccountGroupMemberTypeEnum
;
import
com.gic.auth.constant.SignConstants
;
import
com.gic.auth.dto.AccountGroupDTO
;
import
com.gic.auth.dto.AccountGroupMemberDTO
;
import
com.gic.auth.dto.CollaboratorListDTO
;
import
com.gic.auth.dto.UserListDTO
;
import
com.gic.auth.qo.CollaboratorListQO
;
import
com.gic.auth.qo.UserListQO
;
import
com.gic.auth.service.AccountGroupApiService
;
...
...
@@ -162,8 +160,19 @@ public class AccountGroupController {
for
(
String
str
:
accountGroupIdArr
)
{
accountGroupIdList
.
add
(
Integer
.
parseInt
(
str
));
}
ServiceResponse
<
UserDTO
>
userResponse
=
userApiService
.
getUserByEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
if
(!
userResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"超级管理员数据有误"
);
}
Integer
adminUserId
=
userResponse
.
getResult
().
getUserId
();
List
<
Integer
>
userIdList
=
new
ArrayList
<>(
userIdArr
.
length
);
for
(
String
str
:
userIdArr
)
{
if
(
StringUtils
.
isBlank
(
str
))
{
continue
;
}
if
(
str
.
equals
(
adminUserId
.
toString
()))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"超级管理员不能转移"
);
}
userIdList
.
add
(
Integer
.
parseInt
(
str
));
}
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
...
...
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