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] 회원 별 데일리 루틴 리스트 조회 #41

Merged
merged 6 commits into from
Jan 11, 2024

Conversation

thguss
Copy link
Member

@thguss thguss commented Jan 10, 2024

✨ Related Issue

📝 기능 구현 명세

image

🐥 추가적인 언급 사항

  • N+1 문제를 방지하기 위해 Fetch Join을 추가했습니다.

@thguss thguss added sohyeon 소현 작업 feat 기능 개발 hold review 리뷰 보류 (이전 PR 영향을 받을 때) labels Jan 10, 2024
@thguss thguss self-assigned this Jan 10, 2024
@thguss thguss removed the hold review 리뷰 보류 (이전 PR 영향을 받을 때) label Jan 10, 2024
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.

너무 고생하셨습니다~~ 소현님은 오늘 끝나시겠군요..

}

private Member findMember(Long id) {
return memberRepository.findById(id)
Copy link
Contributor

Choose a reason for hiding this comment

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

별거 아니긴 한데 유저가 없을 때는 NULL 값이 들어오는데 에러 처리가 따로 필요할까요?

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
기본적으로 JPA에서 제공하는 findById 메소드는 Optional 타입을 반환해요. Member 값이 없을 때는 빈 Optional 값을 보내게 됩니다. 해당 값에 대해 아래의 .orElseThrow(() -> new EntityNotFoundException(INVALID_MEMBER.getMeesage())); 코드로 이러한 경우를 처리하게 됩니다!

아래 Optional 관련 레퍼런스 추가해두겠습니다 :)
https://mangkyu.tistory.com/70

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.

수고하셨습니다~!!

@@ -90,4 +86,16 @@ private void checkRoutineForMember(Member member, MemberDailyRoutine routine) {
throw new IllegalStateException(INACCESSIBLE_ROUTINE.getMeesage());
}
}

@Override
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 b5a2743 into develop Jan 11, 2024
1 check passed
@thguss thguss deleted the feature/#40-routine-get-api branch January 11, 2024 05:05
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