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
2615d545
Commit
2615d545
authored
Jun 05, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运维人员部门职位权限调整
parent
97cd84f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+22
-2
dubbo-gic-platform-auth-service.xml
...ce/src/main/resources/dubbo-gic-platform-auth-service.xml
+1
-0
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
2615d545
...
...
@@ -5,7 +5,10 @@ import java.util.stream.Collectors;
import
com.gic.auth.entity.*
;
import
com.gic.auth.qo.UserMenuQO
;
import
com.gic.authcenter.api.dto.GicDepartmentDTO
;
import
com.gic.authcenter.api.dto.GicPositionDTO
;
import
com.gic.authcenter.api.dto.GicUserDTO
;
import
com.gic.authcenter.api.service.GicDepartmentService
;
import
com.gic.authcenter.api.service.GicUserService
;
import
com.gic.commons.util.CollectionUtil
;
import
com.gic.enterprise.dto.EnterpriseDTO
;
...
...
@@ -66,6 +69,8 @@ public class MenuApiServiceImpl implements MenuApiService {
private
MenuAuthDepartService
menuAuthDepartService
;
@Autowired
private
GicUserService
gicUserService
;
@Autowired
private
GicDepartmentService
gicDepartmentService
;
@Override
public
ServiceResponse
<
List
<
MenuDTO
>>
listByMenuIdList
(
List
<
Integer
>
menuIdList
)
{
...
...
@@ -1208,8 +1213,23 @@ public class MenuApiServiceImpl implements MenuApiService {
LOGGER
.
info
(
"运维人员的部门职位数据:{}"
,
JSON
.
toJSONString
(
gicUserDTO
));
//如果是运营人员
Set
<
String
>
departPosition
=
new
HashSet
<>(
2
);
if
(
StringUtils
.
isNotBlank
(
gicUserDTO
.
getDepartmentCode
()))
{
departPosition
.
add
(
gicUserDTO
.
getDepartmentCode
()
+
"-"
+
gicUserDTO
.
getPositionCode
());
String
departmentCode
=
gicUserDTO
.
getDepartmentCode
();
if
(
StringUtils
.
isNotBlank
(
departmentCode
))
{
if
(
StringUtils
.
isBlank
(
gicUserDTO
.
getPositionCode
()))
{
//如果职位code是空,则取下面全部的职位code
List
<
GicDepartmentDTO
>
gicDepartmentDTOList
=
gicDepartmentService
.
listAllGicDepartment
();
if
(
CollectionUtils
.
isNotEmpty
(
gicDepartmentDTOList
))
{
Map
<
String
,
List
<
GicPositionDTO
>>
departMap
=
gicDepartmentDTOList
.
stream
()
.
collect
(
Collectors
.
toMap
(
e
->
e
.
getDepartmentCode
(),
e
->
e
.
getPositionList
()));
List
<
GicPositionDTO
>
positionList
=
departMap
.
get
(
departmentCode
);
if
(
CollectionUtils
.
isNotEmpty
(
positionList
))
{
positionList
.
forEach
(
e
->
{
departPosition
.
add
(
departmentCode
+
"-"
+
e
.
getPositionCode
());
});
}
}
}
}
//过滤运营人员的部门职位权限
Map
<
String
,
List
<
TabSysMenuAuthDepart
>>
departMap
=
getAuthDepartMap
(
null
);
...
...
gic-platform-auth-service/src/main/resources/dubbo-gic-platform-auth-service.xml
View file @
2615d545
...
...
@@ -70,4 +70,5 @@
<dubbo:reference
interface=
"com.gic.goods.api.service.GoodsRightsSelectorApiService"
id=
"goodsRightsSelectorApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.authcenter.api.service.GicUserService"
id=
"gicUserService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.authcenter.api.service.GicDepartmentService"
id=
"gicDepartmentService"
timeout=
"6000"
/>
</beans>
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