提交 38182c09 编写于 作者: F fengyw

课程收藏列出功能

上级 c72475c1
......@@ -134,11 +134,11 @@ public class CourseBiz extends BaseBiz {
}
private List<CourseCommentResp> filter(List<UserCourseComment> userCourseComments, Long commentId) {
List<UserCourseComment> list = userCourseComments.stream().filter(item -> item.getCommentId().compareTo(commentId) == 0).collect(Collectors.toList());
List<UserCourseComment> list = userCourseComments.stream().filter(item -> item.getCommentId().equals(commentId)).collect(Collectors.toList());
if (CollUtil.isNotEmpty(list)) {
List<CourseCommentResp> resps = BeanUtil.copyProperties(list, CourseCommentResp.class);
for (CourseCommentResp resp : resps) {
resp.setCourseCommentRespList(filter(userCourseComments, resp.getCommentId()));
resp.setCourseCommentRespList(filter(userCourseComments, resp.getId()));
}
return resps;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册