Skip to content
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

[FEAT] 테마 별 데일리 루틴 리스트 조회 #23

Merged
merged 5 commits into from
Jan 9, 2024

Conversation

thguss
Copy link
Member

@thguss thguss commented Jan 9, 2024

✨ Related Issue

📝 기능 구현 명세

image

🐥 추가적인 언급 사항

  • 이전 PR(테마 리스트 별 데일리 루틴 리스트 조회)이 포함되어 있어요. 이전 PR 병합 후 리뷰 부탁드려요 :)

@thguss thguss requested review from csb9427 and Chan531 January 9, 2024 10:22
@thguss thguss self-assigned this Jan 9, 2024
@thguss thguss added sohyeon 소현 작업 feat 기능 개발 hold review 리뷰 보류 (이전 PR 영향을 받을 때) labels Jan 9, 2024
@thguss thguss removed the hold review 리뷰 보류 (이전 PR 영향을 받을 때) label Jan 9, 2024
Copy link
Contributor

@Chan531 Chan531 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~ 저도 이제 소셜로그인 폭풍 pr 모드 on.


private DailyTheme getTheme(Long id) {
return dailyThemeRepository.findById(id)
.orElseThrow(() -> new EntityNotFoundException(INVALID_THEME.getMessage()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

세미나에서는 repository에서 에러를 던지는 코드로 배웠는데 두 방법 중 service에서 에러를 던지는 코드로 작성하신 이유가 혹시 있다면 궁금합니다!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 이건 저도 궁금해요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 질문입니다. 구두 회의로 의논 나눴으니 넘어가도록 하겠습니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@csb9427 찬이와 구두로 논의했는데, Repository에서 예외를 던지면 데이터가 존재하지 않을 경우의 추가적인 처리가 한정적이라고 생각해서 서비스 예외 처리로 판단했어요. 서비스에서 Optional로 받아오면 데이터가 비어있을 때의 추가 처리가 좀 더 확장적으로 이루어질 수 있다고 생각합니다.

Copy link
Contributor

@csb9427 csb9427 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

자극받고 갑니다!! 고생하셨어요

@@ -22,6 +22,7 @@ public List<DailyRoutine> findAllByThemes(List<Long> themeIds) {
return queryFactory
.selectFrom(dailyRoutine)
.where(dailyRoutine.theme.id.in(themeIds))
.orderBy(dailyRoutine.content.asc())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asc는 생략 불가능한가요? 단순 궁금

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@csb9427 생략하면 컴파일 오류가 뜨더라구요 😅


private DailyTheme getTheme(Long id) {
return dailyThemeRepository.findById(id)
.orElseThrow(() -> new EntityNotFoundException(INVALID_THEME.getMessage()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 이건 저도 궁금해요!

@thguss thguss merged commit c866d09 into develop Jan 9, 2024
1 check passed
@thguss thguss deleted the feature/#22-routine-get-api branch January 9, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 기능 개발 sohyeon 소현 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 테마 별 데일리 루틴 리스트 조회
3 participants