提交 97d15c40 authored 作者: renjianyu's avatar renjianyu

--no commit message

上级 cd490628
...@@ -1196,10 +1196,10 @@ public class EbookController { ...@@ -1196,10 +1196,10 @@ public class EbookController {
public List<ChapterLibrary> tree(List<ChapterLibrary> list,List<ChapterLibrary> voList){ public List<ChapterLibrary> tree(List<ChapterLibrary> list,List<ChapterLibrary> voList){
voList.forEach(entity ->{ voList.forEach(entity ->{
//第一次设置 一级分类的子类 后续递归设置 子类的子类 //第一次设置 一级分类的子类 后续递归设置 子类的子类
entity.setList(Copy.copyList(list, ChapterLibrary.class,obj -> obj.getParentId().equals(entity.getMarkId()))); entity.setChapterList(Copy.copyList(list, ChapterLibrary.class,obj -> obj.getParentId().equals(entity.getMarkId())));
//当前分类存在子类 开始递归子类 //当前分类存在子类 开始递归子类
if(entity.getList().size() > 0){ if(entity.getChapterList().size() > 0){
tree(list, entity.getList()); tree(list, entity.getChapterList());
} }
}); });
return voList; return voList;
......
...@@ -54,7 +54,7 @@ public class ChapterLibrary implements java.io.Serializable { ...@@ -54,7 +54,7 @@ public class ChapterLibrary implements java.io.Serializable {
@Transient @Transient
@ApiModelProperty(value = "子目录") @ApiModelProperty(value = "子目录")
private List<ChapterLibrary> list = new ArrayList<ChapterLibrary>(); private List<ChapterLibrary> chapterList = new ArrayList<ChapterLibrary>();
@Transient @Transient
@ApiModelProperty(value = "绑定资源状态") @ApiModelProperty(value = "绑定资源状态")
......
...@@ -474,10 +474,10 @@ public class FgEbookController { ...@@ -474,10 +474,10 @@ public class FgEbookController {
public List<ChapterLibrary> tree(List<ChapterLibrary> list,List<ChapterLibrary> voList){ public List<ChapterLibrary> tree(List<ChapterLibrary> list,List<ChapterLibrary> voList){
voList.forEach(entity ->{ voList.forEach(entity ->{
//第一次设置 一级分类的子类 后续递归设置 子类的子类 //第一次设置 一级分类的子类 后续递归设置 子类的子类
entity.setList(Copy.copyList(list, ChapterLibrary.class,obj -> obj.getParentId().equals(entity.getMarkId()))); entity.setChapterList(Copy.copyList(list, ChapterLibrary.class,obj -> obj.getParentId().equals(entity.getMarkId())));
//当前分类存在子类 开始递归子类 //当前分类存在子类 开始递归子类
if(entity.getList().size() > 0){ if(entity.getChapterList().size() > 0){
tree(list, entity.getList()); tree(list, entity.getChapterList());
} }
}); });
return voList; return voList;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论