-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: 게시글 상세 조회시 생성일자 작성자 등의 추가 정보를 보내주는 기능 구현 (#75)
* #74 - feat: 게시글 상세 조회 시 디테일한 정보를 보내준다. 생성일자, 수정일자, 내가 쓴 글인지 등의 정보를 추가함 * #74 - test: 구현한 기능의 테스트 코드 작성
- Loading branch information
Showing
7 changed files
with
113 additions
and
20 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
17 changes: 17 additions & 0 deletions
17
src/main/java/cotato/bookitlist/post/dto/PostDetailDto.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,17 @@ | ||
package cotato.bookitlist.post.dto; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public record PostDetailDto( | ||
Long postId, | ||
Long memberId, | ||
Long bookId, | ||
String title, | ||
String content, | ||
int likeCount, | ||
int viewCount, | ||
LocalDateTime createdAt, | ||
LocalDateTime modifiedAt, | ||
boolean liked | ||
) { | ||
} |
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
5 changes: 5 additions & 0 deletions
5
src/main/java/cotato/bookitlist/post/repository/querydsl/PostRepositoryCustom.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,9 +1,14 @@ | ||
package cotato.bookitlist.post.repository.querydsl; | ||
|
||
import cotato.bookitlist.post.dto.PostDetailDto; | ||
import cotato.bookitlist.post.dto.PostDto; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
|
||
import java.util.Optional; | ||
|
||
public interface PostRepositoryCustom { | ||
Page<PostDto> findWithLikedByIsbn13(String isbn13, Long memberId, Pageable pageable); | ||
|
||
Optional<PostDetailDto> findDetailByPostId(Long postId, Long memberId); | ||
} |
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