-
Notifications
You must be signed in to change notification settings - Fork 1
6주차 미션 - 앤디/박영찬 #11
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
6주차 미션 - 앤디/박영찬 #11
The head ref may contain hidden characters: "\uC564\uB514/\uBC15\uC601\uCC2C"
Conversation
- Store owner 매핑을 member_id로 수정 - MemberFoodPreference에 BaseTimeEntity 상속 추가 - Photo 엔티티 Builder 패턴 정리
- JPQL @query방식으로 중복 리뷰 체크 - ReviewService에 리뷰 작성 로직 구현 - MemberRepository, StoreRepository 추가
- @TestPropertySource로 H2 데이터베이스 설정 추가 - H2 의존성 추가로 빌드 실패 문제 해결
- ErrorCode enum 및 BusinessException 구현 - GlobalExceptionHandler로 전역 예외 처리 - ErrorResponse DTO로 일관된 에러 응답 제공 - ReviewService 예외 처리 개선
- MemberService 및 getMyPage 메서드 추가 - MyPageResponse DTO 생성 - ReviewRepository에 countByMemberId 메서드 추가 - InquiryRepository 생성 및 countByMemberId 메서드 추가 - NotificationSettingRepository 생성 및 findByMemberId 메서드 추가
- 메서드 이름 생성 방식에서 @query로 변경 -연관 엔티티의 속성 접근 시 JPQL 사용으로 일관성 확보
- Mission, Store 엔티티의 일대다 컬렉션에 @batchsize 적용 - N+1 문제 방지 및 메모리 페이징 문제 예방
…조회 기능 구현 - ReviewResponse 미션형식으로 개선
yujin9907
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
계층별로 깔끔하게 분리된 코드 같아요 👍
6주차 내용에 더하여 fetch join, count 를 이용하여 n+1 문제, 페이지네이션 문제까지 깔끔하게 해결해주셨슴니다
고생 많으셨습니다!
|
|
||
| //검색 - 별점순 필터링 및 가게별 조건 추가 | ||
| @GetMapping("/search") | ||
| public List<Review> searchReview( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ModelAttribute SearchReviewRequest request 와 같이 사용해도 좋을 거 같습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여러개의 파라미터를 받을 경우에 사용하면 좋네요! 감사합니다!
| request.getSortDirection() | ||
| ); | ||
|
|
||
| List<Review> reviews = queryFactory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left join으로 인한 중복으로 인해, findMyReviews()에서는 distinct()를 호출해주셨습니다. searchReview() 에서도 사진 갯수만큼 리뷰가 중복되지 않는지, 확인이 필요할 거 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 제가 까먹었네요... 감사합니다!
- ApiResponse로 성공/실패 응답 구조 통합 - SuccessCode에 HttpStatus 추가하여 ErrorCode와 구조 통일 - GlobalExceptionHandler의 모든 예외를 ApiResponse로 통일 - ReviewController에 SuccessCode 적용
6주차 미션 수행했습니다.