-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: 독서 기록 목록 API에 대표 감정 응답 추가 및 버그 개선 #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ba1d6ce
[BOOK-486] feat: infra - 대표 감정 조회 Querydsl 집계 쿼리 추가
move-hoon b28fb24
[BOOK-486] refactor: domain - 대표 감정 조회 DB 집계 쿼리 사용으로 변경
move-hoon 7fed79c
[BOOK-486] feat: apis - 독서 기록 목록 API에 대표 감정 응답 추가
move-hoon 5ca6dcc
[BOOK-486] refactor: domain - DomainService 중복 코드 제거 및 헬퍼 메서드 추출
move-hoon 84899b2
[BOOK-486] chore: unused import 제거 및 헬퍼 메서드 하단으로 이동
move-hoon a0cb5fd
[BOOK-486] refactor: infra,apis - CodeRabbit 리뷰 반영 (QueryDSL 개선 & DTO…
move-hoon dd1611a
[BOOK-486] fix: domain,apis - 독서 기록 생성/상세 조회 시 도서 정보 null 버그 수정
move-hoon 496ce6c
[BOOK-486] chore: domain - 사용하지 않는 import문 제거
move-hoon e51e335
[BOOK-486] fix: infra - 세부 감정 수정 시 Duplicate Key 에러 해결 (Soft Delete →…
move-hoon aaa4b9b
[BOOK-486] fix: domain - 독서 기록 수정 시 pageNumber, review 삭제 가능하도록 로직 변경
move-hoon a42eddd
[BOOK-486] refactor: infra - ReadingRecordDetailTagEntity Soft Delete 제거
move-hoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
apis/src/main/kotlin/org/yapp/apis/emotion/dto/response/EmotionDetailDto.kt
This file contains hidden or 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,19 @@ | ||
| package org.yapp.apis.emotion.dto.response | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema | ||
| import java.util.UUID | ||
|
|
||
| @Schema(name = "EmotionDetailDto", description = "세부 감정") | ||
| data class EmotionDetailDto private constructor( | ||
| @field:Schema(description = "세부 감정 ID", example = "123e4567-e89b-12d3-a456-426614174000") | ||
| val id: UUID, | ||
|
|
||
| @field:Schema(description = "세부 감정 이름", example = "설레는") | ||
| val name: String | ||
| ) { | ||
| companion object { | ||
| fun of(id: UUID, name: String): EmotionDetailDto { | ||
| return EmotionDetailDto(id = id, name = name) | ||
| } | ||
| } | ||
| } | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or 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 hidden or 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 hidden or 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
18 changes: 18 additions & 0 deletions
18
apis/src/main/kotlin/org/yapp/apis/readingrecord/dto/response/PrimaryEmotionDto.kt
This file contains hidden or 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,18 @@ | ||
| package org.yapp.apis.readingrecord.dto.response | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema | ||
|
|
||
| @Schema(name = "PrimaryEmotionDto", description = "대분류 감정") | ||
| data class PrimaryEmotionDto private constructor( | ||
| @field:Schema(description = "감정 코드", example = "JOY") | ||
| val code: String, | ||
|
|
||
| @field:Schema(description = "감정 표시 이름", example = "즐거움") | ||
| val displayName: String | ||
| ) { | ||
| companion object { | ||
| fun of(code: String, displayName: String): PrimaryEmotionDto { | ||
| return PrimaryEmotionDto(code = code, displayName = displayName) | ||
| } | ||
| } | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
28 changes: 28 additions & 0 deletions
28
...tlin/org/yapp/apis/readingrecord/dto/response/ReadingRecordsWithPrimaryEmotionResponse.kt
This file contains hidden or 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 org.yapp.apis.readingrecord.dto.response | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema | ||
| import org.springframework.data.domain.Page | ||
|
|
||
| @Schema( | ||
| name = "ReadingRecordsWithPrimaryEmotionResponse", | ||
| description = "독서 기록 목록과 대표 감정 응답" | ||
| ) | ||
| data class ReadingRecordsWithPrimaryEmotionResponse private constructor( | ||
| @field:Schema(description = "해당 책의 대표(최다) 감정") | ||
| val primaryEmotion: PrimaryEmotionDto?, | ||
|
|
||
| @field:Schema(description = "독서 기록 목록 (페이징)") | ||
| val records: Page<ReadingRecordResponseV2> | ||
| ) { | ||
| companion object { | ||
| fun of( | ||
| primaryEmotion: PrimaryEmotionDto?, | ||
| records: Page<ReadingRecordResponseV2> | ||
| ): ReadingRecordsWithPrimaryEmotionResponse { | ||
| return ReadingRecordsWithPrimaryEmotionResponse( | ||
| primaryEmotion = primaryEmotion, | ||
| records = records | ||
| ) | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.