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
8bd7ece9
Commit
8bd7ece9
authored
Mar 05, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改审核员的管理员数量
parent
12178ad4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
AuditorAuditedGroupRelServiceImpl.java
.../auth/service/impl/AuditorAuditedGroupRelServiceImpl.java
+12
-7
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/AuditorAuditedGroupRelServiceImpl.java
View file @
8bd7ece9
...
...
@@ -79,13 +79,15 @@ public class AuditorAuditedGroupRelServiceImpl implements AuditorAuditedGroupRel
return
Collections
.
emptyMap
();
}
// 获取 受审组 -> 审核员 的map
Map
<
Integer
,
Integer
>
groupAuditorMap
=
getAuditedGroupBelongAuditor
(
relList
);
Map
<
Integer
,
Set
<
Integer
>
>
groupAuditorMap
=
getAuditedGroupBelongAuditor
(
relList
);
Map
<
Integer
,
Set
<
Integer
>>
tmpMap
=
new
HashMap
<>();
for
(
TabAuditedGroupUserRel
userRel
:
userList
)
{
Integer
auditedGroupId
=
userRel
.
getAuditedGroupId
();
Integer
auditorId
=
groupAuditorMap
.
get
(
auditedGroupId
);
Set
<
Integer
>
set
=
tmpMap
.
computeIfAbsent
(
auditorId
,
k
->
new
HashSet
<>());
set
.
add
(
userRel
.
getUserId
());
Set
<
Integer
>
auditorIdSet
=
groupAuditorMap
.
get
(
auditedGroupId
);
for
(
Integer
auditorId
:
auditorIdSet
)
{
Set
<
Integer
>
set
=
tmpMap
.
computeIfAbsent
(
auditorId
,
k
->
new
HashSet
<>());
set
.
add
(
userRel
.
getUserId
());
}
}
Map
<
Integer
,
Integer
>
resultMap
=
new
HashMap
<>();
for
(
Map
.
Entry
<
Integer
,
Set
<
Integer
>>
entry
:
tmpMap
.
entrySet
())
{
...
...
@@ -100,10 +102,13 @@ public class AuditorAuditedGroupRelServiceImpl implements AuditorAuditedGroupRel
return
tabAuditorAuditedGroupRelMapper
.
listRelByAuditedGroupIdAndAuditId
(
enterpriseId
,
auditedGroupIds
,
projectAuditorIds
);
}
private
Map
<
Integer
,
Integer
>
getAuditedGroupBelongAuditor
(
List
<
TabAuditorAuditedGroupRel
>
relList
)
{
Map
<
Integer
,
Integer
>
groupAuditorMap
=
new
HashMap
<>();
private
Map
<
Integer
,
Set
<
Integer
>
>
getAuditedGroupBelongAuditor
(
List
<
TabAuditorAuditedGroupRel
>
relList
)
{
Map
<
Integer
,
Set
<
Integer
>
>
groupAuditorMap
=
new
HashMap
<>();
for
(
TabAuditorAuditedGroupRel
tabAuditorAuditedGroupRel
:
relList
)
{
groupAuditorMap
.
put
(
tabAuditorAuditedGroupRel
.
getAuditedGroupId
(),
tabAuditorAuditedGroupRel
.
getAuditorId
());
// Set<Integer> set = tmpMap.computeIfAbsent(auditorId, k -> new HashSet<>());
// groupAuditorMap.computeIfAbsent(tabAuditorAuditedGroupRel.getAuditedGroupId(), tabAuditorAuditedGroupRel.getAuditorId());
Set
<
Integer
>
set
=
groupAuditorMap
.
computeIfAbsent
(
tabAuditorAuditedGroupRel
.
getAuditedGroupId
(),
k
->
new
HashSet
<>());
set
.
add
(
tabAuditorAuditedGroupRel
.
getAuditorId
());
}
return
groupAuditorMap
;
}
...
...
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