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
5784fcf0
Commit
5784fcf0
authored
Jul 24, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加账号分组和组员
parent
89268f4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
AccountGroupController.java
...a/com/gic/auth/web/controller/AccountGroupController.java
+31
-0
No files found.
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/AccountGroupController.java
View file @
5784fcf0
...
...
@@ -212,4 +212,35 @@ public class AccountGroupController {
String
operationObject
=
result
.
isSuccess
()
?
result
.
getResult
()
:
null
;
return
OperationResultUtils
.
operationResult
(
result
,
"添加组员"
,
operationObject
);
}
/**
* 新增账号分组,并且添加组员
* @Title: addGroupAndMember
* @Description:
* @author guojuxing
* @param memberArr
* @param dto
* @return com.gic.commons.webapi.reponse.RestResponse
*/
@RequestMapping
(
"/add-group-and-member"
)
public
RestResponse
addGroupAndMember
(
String
memberArr
,
AccountGroupDTO
dto
)
{
LOGGER
.
info
(
"添加账号分组&组员数组参数:{}"
,
memberArr
);
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
ServiceResponse
<
Integer
>
addGroupResponse
=
accountGroupApiService
.
save
(
dto
);
if
(
addGroupResponse
.
isSuccess
())
{
Integer
groupId
=
addGroupResponse
.
getResult
();
List
<
AccountGroupMemberDTO
>
list
=
JSON
.
parseArray
(
memberArr
,
AccountGroupMemberDTO
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
AccountGroupMemberDTO
temp
:
list
)
{
temp
.
setEnterpriseId
(
enterpriseId
);
temp
.
setAccountGroupId
(
groupId
);
}
}
ServiceResponse
<
String
>
result
=
accountGroupApiService
.
saveAccountGroupRelFetch
(
list
);
String
operationObject
=
result
.
isSuccess
()
?
result
.
getResult
()
:
null
;
return
OperationResultUtils
.
operationResult
(
result
,
"添加账号分组和组员"
,
operationObject
);
}
return
RestResponse
.
failure
(
addGroupResponse
.
getCode
(),
addGroupResponse
.
getMessage
());
}
}
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