Skip to content
Merged

fix #114

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ public class CommentReplyResponseDto {
private String commentReplyContent; // 대댓글 내용
private String commentReplyNickname; // 작성자 닉네임
private LocalDateTime commentReplyDate; // 대댓글 작성 날짜
private String userId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ public class CommentResponseDto {
private String commentContent; // 댓글 내용
private String commentNickname; // 작성자 닉네임
private LocalDateTime commentDate; // 댓글 작성 날짜
private List<CommentReplyResponseDto> commentReplyResponseDtoList; // 대댓글 리스트
private List<CommentReplyResponseDto> commentReplyResponseDtoList;
private String userId;// 대댓글 리스트
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ public List<CommentResponseDto> getCommentList(String contentId) {
.commentContent(comment.getCommentContent())
.commentNickname(comment.getCommentNickname())
.commentDate(comment.getCommentDate())
.userId(comment.getContentId().getUserId().getId())
.commentReplyResponseDtoList(comment.getCommentCommentTable().stream()
.map(reply -> CommentReplyResponseDto.builder()
.commentReplyId(reply.getCommentCommentId())
.commentReplyContent(reply.getCommentCommentContent())
.commentReplyNickname(reply.getUserNickname())
.commentReplyDate(reply.getCommentCommentDate())
.userId(reply.getCommentId().getContentId().getUserId().getId())
.build())
.collect(Collectors.toList()))
.build())
Expand Down