-
Notifications
You must be signed in to change notification settings - Fork 0
6주차미션_정 #7
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
base: main
Are you sure you want to change the base?
6주차미션_정 #7
The head ref may contain hidden characters: "\uC815/\uAE40\uC138\uC815"
Conversation
사용자 ID, 가게명, 별점 필터링
…to 정/김세정 # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Ochangmin524
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.
전체적으로 정말 잘 작성해주셨습니다!
아직 응답 통일과 전역 에러 처리 학습 단계가 아니어서, 지금은 dto 객체를 그대로 반환하고 있지만,
추후, 통일된 응답 처리를 통해 좀 더 완성된 응답을 작성하실 수 있습니다!
수고하셨습니다!!
| private final ReviewService reviewService; | ||
|
|
||
| // 로그인된 사용자 ID 가져오기 | ||
| private Long getLoggedInMemberId(){ |
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.
아직 로그인 구현이 안되어서 이렇게 처리하신 것 같습니다.
pathvariable로 멤버의 아이디를 받아도 좋을 것 같아요!
| this.imageUrl = imageUrl; | ||
| } | ||
|
|
||
| public Long getReviewId() { |
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.
이 부분은 롬복의 다양한 어노테이션을 사용해서 깔끔하게 처리해도 좋을 것 같습니다!
| @RequiredArgsConstructor | ||
| public class ReviewRepositoryCustomlmpI implements ReviewRepositoryCustom { | ||
| private final JPAQueryFactory 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.
조회 메서드에도 trasaction(readOnly=true)를 붙여도 좋습니다.
db에서는 조회할 때, 테이블의 수정이나 삭제가 발생하는 경우, 데이터 불일치 문제가 생길 수 있습니다.
따라서 조회 메서드에서도 트랜젝션 처리를 하면, 데이터 불일치 문제를 해결할 수 있습니다.
| @@ -0,0 +1,34 @@ | |||
| package com.example.chapter4_umc.domain.review.dto; | |||
|
|
|||
| public class ReviewDto { | |||
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.
지금은 dto가 하나뿐이지만, 추후 리뷰와 관련된 여러가지의 dto가 필요할 경우를 생각하면서, 네이밍에 대해 한 번 고민해보셔도 좋을 것 같습니다!
🗓 몇 주차 과제인가요?
6주차 과제
📖 과제에 대한 간략한 설명
내가 작성한 리뷰 보기 API, QueryDSL로 구현하기
📷 실습 내용 인증 사진
