Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
c8929690
Commit
c8929690
authored
May 17, 2017
by
fsn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新添加菜单之后无法显示菜单的bug
parent
acfee034
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/main/java/com/stylefeng/guns/common/node/MenuNode.java
+4
-4
No files found.
src/main/java/com/stylefeng/guns/common/node/MenuNode.java
View file @
c8929690
...
...
@@ -185,7 +185,7 @@ public class MenuNode implements Comparable {
for
(
Iterator
<
MenuNode
>
iterator
=
nodeList
.
iterator
();
iterator
.
hasNext
();
)
{
MenuNode
node
=
(
MenuNode
)
iterator
.
next
();
// 根据传入的某个父节点ID,遍历该父节点的所有子节点
if
(
node
.
getParentId
()
!=
0
&&
parentId
==
node
.
getParentId
(
))
{
if
(
node
.
getParentId
()
!=
0
&&
parentId
.
equals
(
node
.
getParentId
()
))
{
recursionFn
(
nodeList
,
node
,
parentId
);
}
}
...
...
@@ -200,7 +200,7 @@ public class MenuNode implements Comparable {
public
void
recursionFn
(
List
<
MenuNode
>
nodeList
,
MenuNode
node
,
Integer
pId
)
{
List
<
MenuNode
>
childList
=
getChildList
(
nodeList
,
node
);
// 得到子节点列表
if
(
childList
.
size
()
>
0
)
{
// 判断是否有子节点
if
(
node
.
getParentId
()
==
pId
)
{
if
(
node
.
getParentId
()
.
equals
(
pId
)
)
{
linkedList
.
add
(
node
);
}
Iterator
<
MenuNode
>
it
=
childList
.
iterator
();
...
...
@@ -209,7 +209,7 @@ public class MenuNode implements Comparable {
recursionFn
(
nodeList
,
n
,
pId
);
}
}
else
{
if
(
node
.
getParentId
()
==
pId
)
{
if
(
node
.
getParentId
()
.
equals
(
pId
)
)
{
linkedList
.
add
(
node
);
}
}
...
...
@@ -225,7 +225,7 @@ public class MenuNode implements Comparable {
Iterator
<
MenuNode
>
it
=
list
.
iterator
();
while
(
it
.
hasNext
())
{
MenuNode
n
=
(
MenuNode
)
it
.
next
();
if
(
n
.
getParentId
()
==
node
.
getId
(
))
{
if
(
n
.
getParentId
()
.
equals
(
node
.
getId
()
))
{
nodeList
.
add
(
n
);
}
}
...
...
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