Skip to content

Commit 716795f

Browse files
committed
refactor: 서비스, 매퍼 수정
1 parent 6b147e1 commit 716795f

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/main/java/com/threestar/trainus/domain/comment/mapper/CommentMapper.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import java.util.List;
44

55
import com.threestar.trainus.domain.comment.dto.CommentPageResponseDto;
6-
import com.threestar.trainus.domain.comment.dto.CommentPageWrapperDto;
76
import com.threestar.trainus.domain.comment.dto.CommentResponseDto;
87
import com.threestar.trainus.domain.comment.entity.Comment;
98

@@ -29,10 +28,4 @@ public static CommentPageResponseDto toCommentPageResponseDto(List<CommentRespon
2928
.count(count)
3029
.build();
3130
}
32-
33-
public static CommentPageWrapperDto toCommentPageWrapperDto(CommentPageResponseDto commentPageResponseDto) {
34-
return CommentPageWrapperDto.builder()
35-
.comments(commentPageResponseDto.getComments())
36-
.build();
37-
}
3831
}

src/main/java/com/threestar/trainus/domain/comment/service/CommentService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public CommentResponseDto createComment(CommentCreateRequestDto request, Long le
3737
.lesson(findLesson)
3838
.user(findUser)
3939
.deleted(false)
40-
.content(request.getContent())
40+
.content(request.content())
4141
.build();
4242

4343
commentRepository.saveAndFlush(newComment); //즉시 저장을 통해 commentId
@@ -51,7 +51,7 @@ public CommentResponseDto createComment(CommentCreateRequestDto request, Long le
5151
}
5252

5353
private Comment findParent(CommentCreateRequestDto request) {
54-
Long parentCommentId = request.getParentCommentId();
54+
Long parentCommentId = request.parentCommentId();
5555
if (parentCommentId == null) {
5656
return null;
5757
}

0 commit comments

Comments
 (0)