main
parent
eef6b9d3bd
commit
8ca921e805
|
|
@ -126,10 +126,10 @@ public class AppDynamicCommentController extends BaseController
|
|||
@GetMapping("/treeList")
|
||||
@ApiOperation(value = "评论树列表", notes = "评论树列表", httpMethod = "GET")
|
||||
public AjaxResult treeList(AppDynamicComment appDynamicComment) {
|
||||
List<AppDynamicCommentVo> list = appDynamicCommentMapper.selectCommentList(appDynamicComment);
|
||||
startPage();
|
||||
//List<AppDynamicCommentVo> list = appDynamicCommentMapper.selectCommentList(appDynamicComment);
|
||||
//startPage();
|
||||
Map map = appDynamicCommentService.treeList(appDynamicComment);
|
||||
map.put("countNum",list.size());
|
||||
return AjaxResult.success(list);
|
||||
//map.put("countNum",list.size());
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ public class AppDynamicCommentServiceImpl implements IAppDynamicCommentService
|
|||
List<AppDynamicCommentVo> parentList = appDynamicComments.stream().filter(entity -> entity.getParentId() == null).collect(Collectors.toList());
|
||||
List<AppDynamicCommentVo> srcList = appDynamicComments.stream().filter(entity -> entity.getParentId() != null).collect(Collectors.toList());
|
||||
map.put("list",buildList(parentList,srcList));
|
||||
map.put("countNum",appDynamicComments.size());
|
||||
return map;
|
||||
}
|
||||
public List<AppDynamicCommentVo> buildList(List<AppDynamicCommentVo> parentList,List<AppDynamicCommentVo> srcList){
|
||||
|
|
|
|||
Loading…
Reference in New Issue