-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT] MyPage 본인이 작성한 게시글 및 댓글 조회, docker volume 설정 (#132)
* feat: Mypage 게시글 필터링 * style: PostController 엔드포인트 myPage로 변경 * feat: MyPage 댓글 조회 Dto 생성 * style: Mapping Url /my-page 변경, UserIdExpression -> AuthorIdExpression * feat: MyPage 댓글 조회(offset기반 페이지네이션) 구현 * chore: ddl-auto create에서 update로 변경 * chore: maria, redis 명명된 volume 설정 * refactor: MyPage 작성한 게시글 조회 함수 변경 * chore: Application 재실행 시 data.sql 실행 X * style: 필드명 변경 * feat: 마이페이지 댓글 조회 (1게시글 1댓글)
- Loading branch information
Showing
13 changed files
with
174 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/main/java/econo/buddybridge/comment/dto/MyPageCommentCustomPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package econo.buddybridge.comment.dto; | ||
|
||
import java.util.List; | ||
|
||
public record MyPageCommentCustomPage( | ||
List<MyPageCommentResDto> content, | ||
Long totalElements, | ||
Boolean last | ||
) { | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/econo/buddybridge/comment/dto/MyPageCommentResDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package econo.buddybridge.comment.dto; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
import econo.buddybridge.member.entity.DisabilityType; | ||
import econo.buddybridge.post.entity.AssistanceType; | ||
import econo.buddybridge.post.entity.PostStatus; | ||
import econo.buddybridge.post.entity.PostType; | ||
import lombok.Builder; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Builder | ||
public record MyPageCommentResDto( | ||
String content, | ||
Long commentId, | ||
Long postId, | ||
String postTitle, | ||
PostStatus postStatus, | ||
PostType postType, | ||
DisabilityType disabilityType, | ||
AssistanceType assistanceType, | ||
LocalDateTime postCreatedAt | ||
) { | ||
|
||
@QueryProjection | ||
public MyPageCommentResDto { | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/econo/buddybridge/comment/repository/CommentRepositoryCustom.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package econo.buddybridge.comment.repository; | ||
|
||
import econo.buddybridge.comment.dto.CommentCustomPage; | ||
import econo.buddybridge.comment.dto.MyPageCommentCustomPage; | ||
import econo.buddybridge.post.entity.Post; | ||
import econo.buddybridge.post.entity.PostType; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface CommentRepositoryCustom { | ||
CommentCustomPage findByPost(Post post, Long cursor, Pageable page); | ||
|
||
MyPageCommentCustomPage findByMemberId(Long memberId, Integer page, Integer size, String sort, PostType postType); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters