关联模块

This commit is contained in:
zhaokaiyao@91isoft.com
2021-11-26 20:29:21 +08:00
parent 9000a6e3fe
commit c209bb485c
8 changed files with 95 additions and 34 deletions
@@ -74,6 +74,9 @@ public class SarVppsTree extends BaseEntity {
@TableField("TYPE")
private String type;
@ApiModelProperty("查询子节点条件")
@TableField(exist = false)
private String nextCondition;
@TableField(exist=false)
private List<String> roleIds;
@@ -82,4 +85,6 @@ public class SarVppsTree extends BaseEntity {
private List<String> childMenuIds;
}
@@ -33,7 +33,7 @@ public class SarVppsTreeServiceImpl extends ServiceImpl<SarVppsTreeDao, SarVppsT
list.forEach(item->{
item.setCode(item.getVppsCode()+item.getChineseName());
item.setVppsCode("10");
item.setId("10");
});
// for(SarVppsTree tree:list){
// tree.setChildren(recursionGetChildren((tree)));
@@ -50,15 +50,14 @@ public class SarVppsTreeServiceImpl extends ServiceImpl<SarVppsTreeDao, SarVppsT
public List<SarVppsTree> recursionGetChildren(SarVppsTree parent){
QueryWrapper<SarVppsTree> sarMenuQueryWrapper=new QueryWrapper<>();
sarMenuQueryWrapper.orderByAsc("SORT");
// sarMenuQueryWrapper.in("PID",parent.getId());
sarMenuQueryWrapper.eq("LEVEL", parent.getLevel()+1)
.eq("TYPE",parent.getType())
.like("VPPS_CODE",parent.getVppsCode());
.like("VPPS_CODE",parent.getId());
List<SarVppsTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
// for(SarVppsTree sarMenu:children){
// sarMenu.setChildren(recursionGetChildren((sarMenu)));
// }
children.forEach(item->{
item.setId(item.getVppsCode());
item.setCode(item.getVppsCode()+item.getChineseName());
});
return children;