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
669e577b
Commit
669e577b
authored
May 09, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用列表过滤商户基础应用修复
parent
31888f7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
MenuController.java
...main/java/com/gic/auth/web/controller/MenuController.java
+5
-3
RoleController.java
...main/java/com/gic/auth/web/controller/RoleController.java
+11
-6
No files found.
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/MenuController.java
View file @
669e577b
...
@@ -199,9 +199,11 @@ public class MenuController {
...
@@ -199,9 +199,11 @@ public class MenuController {
if
(
result
.
isSuccess
())
{
if
(
result
.
isSuccess
())
{
//过滤商户基础应用
//过滤商户基础应用
List
<
MenuDTO
>
appMenuList
=
result
.
getResult
();
List
<
MenuDTO
>
appMenuList
=
result
.
getResult
();
appMenuList
=
appMenuList
.
stream
()
if
(
CollectionUtils
.
isNotEmpty
(
appMenuList
))
{
.
filter
(
e
->
!
EnterpriseBasicAppUtils
.
ENTERPRISE_BASIC_APP_CODE
.
equals
(
e
.
getMenuCode
()))
appMenuList
=
appMenuList
.
stream
()
.
collect
(
Collectors
.
toList
());
.
filter
(
e
->
!
EnterpriseBasicAppUtils
.
ENTERPRISE_BASIC_APP_CODE
.
equals
(
e
.
getMenuCode
()))
.
collect
(
Collectors
.
toList
());
}
return
RestResponse
return
RestResponse
.
success
(
changePageListToTree
(
MenuLevelConstants
.
FIRST_LEVEL_PARENT_ID
,
appMenuList
));
.
success
(
changePageListToTree
(
MenuLevelConstants
.
FIRST_LEVEL_PARENT_ID
,
appMenuList
));
}
}
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/RoleController.java
View file @
669e577b
...
@@ -7,6 +7,7 @@ import java.util.Map;
...
@@ -7,6 +7,7 @@ import java.util.Map;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.gic.auth.web.utils.EnterpriseBasicAppUtils
;
import
com.gic.auth.web.utils.EnterpriseBasicAppUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -74,9 +75,11 @@ public class RoleController {
...
@@ -74,9 +75,11 @@ public class RoleController {
.
listAppPageOfHasBuy
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
.
listAppPageOfHasBuy
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
//过滤商户基础应用
//过滤商户基础应用
List
<
MenuDTO
>
appMenuList
=
appResult
.
getResult
();
List
<
MenuDTO
>
appMenuList
=
appResult
.
getResult
();
appMenuList
=
appMenuList
.
stream
()
if
(
CollectionUtils
.
isNotEmpty
(
appMenuList
))
{
.
filter
(
e
->
!
EnterpriseBasicAppUtils
.
ENTERPRISE_BASIC_APP_CODE
.
equals
(
e
.
getMenuCode
()))
appMenuList
=
appMenuList
.
stream
()
.
collect
(
Collectors
.
toList
());
.
filter
(
e
->
!
EnterpriseBasicAppUtils
.
ENTERPRISE_BASIC_APP_CODE
.
equals
(
e
.
getMenuCode
()))
.
collect
(
Collectors
.
toList
());
}
vo
.
setAppMap
(
vo
.
setAppMap
(
changeListToSelectTree
(
MenuLevelConstants
.
FIRST_LEVEL_PARENT_ID
,
appMenuList
,
gicMap
));
changeListToSelectTree
(
MenuLevelConstants
.
FIRST_LEVEL_PARENT_ID
,
appMenuList
,
gicMap
));
...
@@ -152,9 +155,11 @@ public class RoleController {
...
@@ -152,9 +155,11 @@ public class RoleController {
.
listAppPageOfHasBuy
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
.
listAppPageOfHasBuy
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
if
(
result
.
isSuccess
())
{
if
(
result
.
isSuccess
())
{
List
<
MenuDTO
>
menuList
=
result
.
getResult
();
List
<
MenuDTO
>
menuList
=
result
.
getResult
();
menuList
=
menuList
.
stream
()
if
(
CollectionUtils
.
isNotEmpty
(
menuList
))
{
.
filter
(
e
->
!
EnterpriseBasicAppUtils
.
ENTERPRISE_BASIC_APP_CODE
.
equals
(
e
.
getMenuCode
()))
menuList
=
menuList
.
stream
()
.
collect
(
Collectors
.
toList
());
.
filter
(
e
->
!
EnterpriseBasicAppUtils
.
ENTERPRISE_BASIC_APP_CODE
.
equals
(
e
.
getMenuCode
()))
.
collect
(
Collectors
.
toList
());
}
return
RestResponse
.
success
(
changeListToTree
(
MenuLevelConstants
.
FIRST_LEVEL_PARENT_ID
,
menuList
));
return
RestResponse
.
success
(
changeListToTree
(
MenuLevelConstants
.
FIRST_LEVEL_PARENT_ID
,
menuList
));
}
}
return
EnterpriseRestResponse
.
failure
(
result
);
return
EnterpriseRestResponse
.
failure
(
result
);
...
...
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