关联模块

This commit is contained in:
zhaokaiyao@91isoft.com
2021-11-27 14:14:18 +08:00
parent c209bb485c
commit 419f519430
2 changed files with 23 additions and 0 deletions
@@ -65,4 +65,11 @@ public class SarModelTree extends BaseEntity {
@TableField(exist=false)
private List<String> childMenuIds;
@TableField("HAS_CHILDREN")
private String hasChildren;
@TableField(exist = false)
private boolean leaf;
}
@@ -33,6 +33,14 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
// tree.setChildren(recursionGetChildren((tree)));
// }
list.forEach(item->{
switch (item.getHasChildren()){
case "0":
item.setLeaf(true);
break;
case "1":
item.setLeaf(false);
break;
}
item.setId(item.getName());
});
return list;
@@ -55,6 +63,14 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
// }
children.forEach(item->{
switch (item.getHasChildren()){
case "0":
item.setLeaf(true);
break;
case "1":
item.setLeaf(false);
break;
}
item.setId(item.getName());
});
return children;