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
c08534be
Commit
c08534be
authored
Oct 12, 2019
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
1e1f9191
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
19 deletions
+27
-19
TabAuditedGroupUserRelMapper.java
...com/gic/auth/dao/mapper/TabAuditedGroupUserRelMapper.java
+3
-1
TabAuditorProjectItemRelMapper.java
...m/gic/auth/dao/mapper/TabAuditorProjectItemRelMapper.java
+4
-1
TabSysUserResourceMapper.java
...ava/com/gic/auth/dao/mapper/TabSysUserResourceMapper.java
+3
-2
AuditedGroupUserRelServiceImpl.java
...gic/auth/service/impl/AuditedGroupUserRelServiceImpl.java
+4
-3
AuditorProjectItemRelServiceImpl.java
...c/auth/service/impl/AuditorProjectItemRelServiceImpl.java
+4
-3
UserResourceServiceImpl.java
...va/com/gic/auth/service/impl/UserResourceServiceImpl.java
+9
-9
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabAuditedGroupUserRelMapper.java
View file @
c08534be
...
...
@@ -2,6 +2,7 @@ package com.gic.auth.dao.mapper;
import
com.gic.auth.dto.AuditedGroupUserRelDTO
;
import
com.gic.auth.entity.TabAuditedGroupUserRel
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -62,7 +63,8 @@ public interface TabAuditedGroupUserRelMapper {
Integer
updateStatusByUserIds
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"auditedGroupId"
)
Integer
auditedGroupId
,
@Param
(
"ids"
)
List
<
Integer
>
userIdList
);
List
<
Map
<
Integer
,
Object
>>
getUserCountByAuditedGroup
(
@Param
(
"ids"
)
List
<
Integer
>
auditedGroupIds
);
@MapKey
(
"auditedGroupId"
)
Map
<
Integer
,
Map
<
Integer
,
Long
>>
getUserCountByAuditedGroup
(
@Param
(
"ids"
)
List
<
Integer
>
auditedGroupIds
);
List
<
TabAuditedGroupUserRel
>
listAuditedGroup
(
AuditedGroupUserRelDTO
groupUserRel
);
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabAuditorProjectItemRelMapper.java
View file @
c08534be
package
com
.
gic
.
auth
.
dao
.
mapper
;
import
com.gic.auth.entity.TabAuditorProjectItemRel
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -63,7 +64,8 @@ public interface TabAuditorProjectItemRelMapper {
List
<
TabAuditorProjectItemRel
>
listRelByAuditorId
(
TabAuditorProjectItemRel
auditorProjectItemRel
);
List
<
Map
<
String
,
Object
>>
getCountByAuditorIds
(
@Param
(
"ids"
)
List
<
Integer
>
auditorIdList
);
@MapKey
(
"auditorId"
)
Map
<
Integer
,
Map
<
Integer
,
Long
>>
getCountByAuditorIds
(
@Param
(
"ids"
)
List
<
Integer
>
auditorIdList
);
List
<
Integer
>
listAuditorIdByProjectId
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"projectId"
)
Integer
projectId
);
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabSysUserResourceMapper.java
View file @
c08534be
package
com
.
gic
.
auth
.
dao
.
mapper
;
import
com.gic.auth.entity.TabSysUserResource
;
import
com.gic.auth.entity.TabSysUserRole
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -58,7 +58,8 @@ public interface TabSysUserResourceMapper {
TabSysUserResource
existUserResource
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"resourceId"
)
Integer
resourceId
);
List
<
Map
<
String
,
Object
>>
countByResourceIds
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"ids"
)
List
<
Integer
>
resourceIds
);
@MapKey
(
"resourceId"
)
Map
<
Integer
,
Map
<
Integer
,
Long
>>
countByResourceIds
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"ids"
)
List
<
Integer
>
resourceIds
);
/**
* 删除用户关联数据
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/AuditedGroupUserRelServiceImpl.java
View file @
c08534be
...
...
@@ -51,10 +51,11 @@ public class AuditedGroupUserRelServiceImpl implements AuditedGroupUserRelServic
@Override
public
Map
<
Integer
,
Integer
>
getUserCountByAuditedGroup
(
List
<
Integer
>
auditedGroupIds
)
{
List
<
Map
<
Integer
,
Object
>>
mapList
=
tabAuditedGroupUserRelMapper
.
getUserCountByAuditedGroup
(
auditedGroupIds
);
Map
<
Integer
,
Map
<
Integer
,
Long
>>
mapList
=
tabAuditedGroupUserRelMapper
.
getUserCountByAuditedGroup
(
auditedGroupIds
);
Map
<
Integer
,
Integer
>
resultMap
=
new
HashMap
<>(
auditedGroupIds
.
size
());
for
(
Map
<
Integer
,
Object
>
map
:
mapList
)
{
resultMap
.
put
(
Integer
.
valueOf
(
map
.
get
(
"auditedGroupId"
).
toString
()),
Integer
.
valueOf
(
map
.
get
(
"userCount"
).
toString
()));
for
(
Map
.
Entry
<
Integer
,
Map
<
Integer
,
Long
>>
entry
:
mapList
.
entrySet
())
{
Integer
auditedGroupId
=
entry
.
getKey
();
resultMap
.
put
(
auditedGroupId
,
entry
.
getValue
().
get
(
"userCount"
).
intValue
());
}
return
resultMap
;
}
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/AuditorProjectItemRelServiceImpl.java
View file @
c08534be
...
...
@@ -56,10 +56,11 @@ public class AuditorProjectItemRelServiceImpl implements AuditorProjectItemRelSe
@Override
public
Map
<
Integer
,
Integer
>
getCountByAuditorIds
(
List
<
Integer
>
auditorIdList
)
{
List
<
Map
<
String
,
Object
>>
mapList
=
tabAuditorProjectItemRelMapper
.
getCountByAuditorIds
(
auditorIdList
);
Map
<
Integer
,
Map
<
Integer
,
Long
>>
mapList
=
tabAuditorProjectItemRelMapper
.
getCountByAuditorIds
(
auditorIdList
);
HashMap
<
Integer
,
Integer
>
resultMap
=
new
HashMap
<>(
mapList
.
size
());
for
(
Map
<
String
,
Object
>
map
:
mapList
)
{
resultMap
.
put
(
Integer
.
valueOf
(
map
.
get
(
"auditorId"
).
toString
()),
Integer
.
valueOf
(
map
.
get
(
"projectItemCount"
).
toString
()));
for
(
Map
.
Entry
<
Integer
,
Map
<
Integer
,
Long
>>
entry
:
mapList
.
entrySet
())
{
Integer
auditorId
=
entry
.
getKey
();
resultMap
.
put
(
auditorId
,
entry
.
getValue
().
get
(
"projectItemCount"
).
intValue
());
}
return
resultMap
;
}
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/UserResourceServiceImpl.java
View file @
c08534be
package
com
.
gic
.
auth
.
service
.
impl
;
import
java.util.*
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.auth.dao.mapper.TabSysUserResourceMapper
;
import
com.gic.auth.dto.UserResourceDTO
;
import
com.gic.auth.entity.TabSysUserResource
;
import
com.gic.auth.service.UserResourceService
;
import
com.gic.commons.util.EntityUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.*
;
/**
*
* @Description:
...
...
@@ -36,9 +35,10 @@ public class UserResourceServiceImpl implements UserResourceService {
if
(
CollectionUtils
.
isNotEmpty
(
resourceIds
))
{
//
Map
<
Integer
,
Integer
>
map
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
list
=
tabSysUserResourceMapper
.
countByResourceIds
(
enterpriseId
,
resourceIds
);
for
(
Map
<
String
,
Object
>
integerIntegerMap
:
list
)
{
map
.
put
(
Integer
.
valueOf
(
integerIntegerMap
.
get
(
"resourceId"
).
toString
()),
Integer
.
valueOf
(
integerIntegerMap
.
get
(
"userResourceCount"
).
toString
()));
Map
<
Integer
,
Map
<
Integer
,
Long
>>
mapMap
=
tabSysUserResourceMapper
.
countByResourceIds
(
enterpriseId
,
resourceIds
);
for
(
Map
.
Entry
<
Integer
,
Map
<
Integer
,
Long
>>
entry
:
mapMap
.
entrySet
())
{
Integer
resourceId
=
entry
.
getKey
();
map
.
put
(
resourceId
,
entry
.
getValue
().
get
(
"userResourceCount"
).
intValue
());
}
return
map
;
}
else
{
...
...
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