Skip to content

Conversation

@sejeong223
Copy link
Collaborator

🗓 몇 주차 과제인가요?
6주차 과제

📖 과제에 대한 간략한 설명
내가 작성한 리뷰 보기 API, QueryDSL로 구현하기

📷 실습 내용 인증 사진
image

@sejeong223 sejeong223 self-assigned this Nov 9, 2025
@sejeong223 sejeong223 changed the title 정/김세정 6주차 미션_정 Nov 9, 2025
@sejeong223 sejeong223 changed the title 6주차 미션_정 6주차미션_정 Nov 9, 2025
Copy link
Collaborator

@Ochangmin524 Ochangmin524 left a 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(){
Copy link
Collaborator

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() {
Copy link
Collaborator

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;

Copy link
Collaborator

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 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

지금은 dto가 하나뿐이지만, 추후 리뷰와 관련된 여러가지의 dto가 필요할 경우를 생각하면서, 네이밍에 대해 한 번 고민해보셔도 좋을 것 같습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants