Commit 54579bd1 by 罗志长

fix: 平台端组织返回层级字段

parent edafdbd8
......@@ -63,6 +63,10 @@ public class PlatOrg extends BaseBusEntity {
@TableField(exist = false)
private PlatOrg parent;
@ApiModelProperty(value = "级别")
@TableField(exist = false)
private Integer grade;
private String remark;
}
\ No newline at end of file
......@@ -607,6 +607,10 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
if(CollectionUtils.isEmpty(list)){
return new ArrayList<>();
}
list = list.stream().map(org -> {
org.setGrade(org.getPath().split(",").length);
return org;
}).collect(Collectors.toList());
return createOrgTree(list);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment