11package com .example .dplus .repository .post .comment ;
22
3- import com .example .dplus .dto .response .AccountResponseDto ;
4- import com .example .dplus .dto .response .PostResponseDto ;
3+ import com .example .dplus .dto .response .AccountResponseDto . MyComment ;
4+ import com .example .dplus .dto .response .PostResponseDto . PostComment ;
55import com .querydsl .core .types .Projections ;
66import com .querydsl .jpa .impl .JPAQueryFactory ;
77import lombok .RequiredArgsConstructor ;
@@ -20,9 +20,9 @@ public class PostCommentRepositoryImpl implements PostCommentRepositoryCustom{
2020 private final JPAQueryFactory jpaQueryFactory ;
2121
2222 @ Override
23- public List <PostResponseDto . PostComment > findPostCommentByPostId (Long postId ) {
23+ public List <PostComment > findPostCommentByPostId (Long postId ) {
2424 return jpaQueryFactory
25- .select (Projections .constructor (PostResponseDto . PostComment .class ,
25+ .select (Projections .constructor (PostComment .class ,
2626 postComment .account .id ,
2727 postComment .account .nickname ,
2828 postComment .account .profileImg ,
@@ -41,9 +41,9 @@ public List<PostResponseDto.PostComment> findPostCommentByPostId(Long postId) {
4141
4242 // 나의 댓글
4343 @ Override
44- public List <AccountResponseDto . MyComment > findPostCommentByAccountId (Long accountId , Pageable pageable ) {
44+ public List <MyComment > findPostCommentByAccountId (Long accountId , Pageable pageable ) {
4545 return jpaQueryFactory
46- .select (Projections .constructor (AccountResponseDto . MyComment .class ,
46+ .select (Projections .constructor (MyComment .class ,
4747 postComment .id ,
4848 postComment .content ,
4949 postCommentLikes .count (),
@@ -54,8 +54,8 @@ public List<AccountResponseDto.MyComment> findPostCommentByAccountId(Long accoun
5454 post .title
5555 ))
5656 .from (postComment )
57- .join (postComment .account , account ).on (account .id .eq (accountId ))
58- .join (postComment .post , post ).on (post .account .id .eq (accountId ))
57+ // .join(postComment.account, account).on(account.id.eq(accountId))
58+ // .join(postComment.post, post).on(post.account.id.eq(accountId))
5959 .leftJoin (postCommentLikes ).on (postComment .id .eq (postCommentLikes .postComment .id ))
6060 .offset (pageable .getOffset ())
6161 .limit (pageable .getPageSize ())
0 commit comments