Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
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
platform
hg-smart
Commits
9a462646
Commit
9a462646
authored
Jul 08, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单APP端查询需要查询出树结构
parent
363c3378
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
AuthenticationInfo.java
...sight/xservices/xs/authentication/AuthenticationInfo.java
+21
-8
No files found.
src/main/java/com/baosight/xservices/xs/authentication/AuthenticationInfo.java
View file @
9a462646
...
...
@@ -12,13 +12,7 @@ import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
com.baosight.xservices.xs.util.LoginUserDetails
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
...
...
@@ -574,12 +568,16 @@ public class AuthenticationInfo {
BigDecimal
retLeaf
=
(
BigDecimal
)
retResultMap
.
get
(
"leaf"
);
BigDecimal
menuDecimal
=
new
BigDecimal
(
"2"
);
BigDecimal
leafDecimal
=
new
BigDecimal
(
"1"
);
String
parent
=
(
String
)
retResultMap
.
get
(
"parent"
);
if
(
retLeaf
!=
null
&&
menuDecimal
.
equals
(
retLeaf
))
{
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"node"
,
retResultMap
.
get
(
"label"
).
toString
());
List
childPageForMenu
=
getDao
().
query
(
"XSMenu.queryForRecursiveChildPage"
,
paramMap
);
boolean
flag
=
false
;
List
childList
=
new
LinkedList
();
if
(
childPageForMenu
!=
null
&&
childPageForMenu
.
size
()
>
0
)
{
//APP需要遍历所有子菜单
if
(
parent
.
equals
(
"APP"
)){
label85:
for
(
int
j
=
0
;
j
<
pageAuthList
.
size
();
++
j
)
{
Map
pageAuthMap
=
(
Map
)
pageAuthList
.
get
(
j
);
...
...
@@ -588,12 +586,27 @@ public class AuthenticationInfo {
Map
childPageMap
=
(
Map
)
childPageForMenu
.
get
(
k
);
if
(
childPageMap
.
get
(
"label"
).
toString
().
equals
(
pageAuthMap
.
get
(
"label"
).
toString
()))
{
flag
=
true
;
childList
.
add
(
pageAuthMap
);
}
}
}
}
else
{
label85:
for
(
int
j
=
0
;
j
<
pageAuthList
.
size
();
++
j
)
{
Map
pageAuthMap
=
(
Map
)
pageAuthList
.
get
(
j
);
for
(
int
k
=
0
;
k
<
childPageForMenu
.
size
();
++
k
)
{
Map
childPageMap
=
(
Map
)
childPageForMenu
.
get
(
k
);
if
(
childPageMap
.
get
(
"label"
).
toString
().
equals
(
pageAuthMap
.
get
(
"label"
).
toString
()))
{
flag
=
true
;
childList
.
add
(
pageAuthMap
);
break
label85
;
}
}
}
}
retResultMap
.
put
(
"childMenu"
,
childList
);
}
if
(
flag
)
{
menuAndPageListForTree
.
add
(
retResultMap
);
}
...
...
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