|
@@ -7,6 +7,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
import com.fuint.common.domain.TreeNode;
|
|
|
import com.fuint.utils.StringUtil;
|
|
|
+import com.google.common.base.Objects;
|
|
|
|
|
|
/**
|
|
|
* 树形展示工具类
|
|
@@ -28,7 +29,7 @@ public class TreeUtil {
|
|
|
for (TreeNode node1 : sourceTreeNodeList) {
|
|
|
boolean mark = false;
|
|
|
for (TreeNode node2 : sourceTreeNodeList) {
|
|
|
- if (StringUtil.isNotEmpty(node1.getName()) && node1.getPId() == node2.getId()) {
|
|
|
+ if (StringUtil.isNotEmpty(node1.getName()) && Objects.equal(node1.getPId(),node2.getId())) {
|
|
|
mark = true;
|
|
|
if (node2.getChildrens() == null) {
|
|
|
node2.setChildrens(new ArrayList<>());
|