Skip to content

Conversation

@JjungminLee
Copy link
Collaborator

@JjungminLee JjungminLee commented Oct 12, 2025

#️⃣ Issue Number

📝 요약(Summary)

  • 기존 리뷰 v2 menu 작성dto에 v1 dto가 적용되어 있어 해당 부분을 수정했습니다.

💬 공유사항 to 리뷰어

✅ PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • 커밋 메시지 컨벤션에 맞게 작성했습니다.
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트).

@JjungminLee JjungminLee self-assigned this Oct 12, 2025
@JjungminLee JjungminLee added the fix 고치기 label Oct 12, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @JjungminLee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 리뷰 v2 메뉴 생성 로직에서 v1 DTO가 잘못 적용되었던 문제를 해결합니다. 새로운 CreateMenuReviewRequestV2 DTO를 도입하여 v2 API가 의도한 대로 작동하도록 데이터 구조를 개선했습니다. 이를 통해 메뉴 리뷰 작성 시 여러 이미지를 첨부할 수 있게 되어 기능의 유연성이 향상되었습니다.

Highlights

  • 새로운 DTO 도입: 리뷰 v2 메뉴 작성을 위한 새로운 DTO인 CreateMenuReviewRequestV2가 추가되었습니다.
  • API 엔드포인트 업데이트: ReviewControllerV2createMenuReview 엔드포인트가 CreateMenuReviewRequestV2를 사용하도록 수정되었습니다.
  • 서비스 로직 변경: ReviewServiceV2createMenuReview 메서드가 CreateMenuReviewRequestV2를 받아 처리하도록 변경되었으며, 여러 이미지 URL을 처리하는 로직이 추가되었습니다.
  • 이미지 처리 개선: 기존에는 단일 이미지 URL을 처리했지만, 이제는 CreateMenuReviewRequestV2를 통해 여러 이미지 URL을 리스트 형태로 받아 리뷰에 추가할 수 있습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


오래된 DTO, 새로운 버전으로 고쳐, 버그는 사라져.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

리뷰 v2 메뉴 작성 API의 DTO를 수정하는 PR이네요. v1 DTO가 사용되던 문제를 CreateMenuReviewRequestV2를 새로 정의하고 적용하여 잘 해결하셨습니다. 전체적인 로직은 올바르지만, 새로 추가된 DTO에 사용되지 않는 메서드가 있고, 서비스 로직의 로그 기록 부분에 작은 오류가 있어 수정을 제안합니다.

Comment on lines 41 to 45
public List<ReviewImage> createReviewImages(Review review) {
return imageUrls.stream()
.map(imageUrl -> new ReviewImage(review, imageUrl))
.collect(Collectors.toList());
}

Choose a reason for hiding this comment

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

medium

createReviewImages 메서드는 현재 코드에서 사용되지 않고 있습니다. ReviewServiceV2에서는 review::addReviewImage를 통해 이미지를 추가하고 있으므로, 중복되고 사용되지 않는 이 메서드는 삭제하여 코드를 더 간결하게 유지하는 것이 좋겠습니다.

user.getId(),
request.getMenuLike().getIsLike(),
request.getImageUrl())
request.getMenuLike(),

Choose a reason for hiding this comment

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

medium

로그 메시지에 MenuLikeRequest 객체 자체가 전달되어 의도치 않은 값(객체 참조)이 기록됩니다. isLike boolean 값을 기록하려면 .getIsLike()를 호출해야 합니다.

또한, 121행의 포맷 문자열과 126행의 인자 타입이 일치하지 않는 문제도 있습니다. (imageUrl=%s 와 이미지 개수). 이 부분도 함께 수정하는 것을 권장합니다.

Suggested change
request.getMenuLike(),
request.getMenuLike().getIsLike(),

@JjungminLee JjungminLee merged commit eceda69 into develop Oct 12, 2025
@JjungminLee JjungminLee deleted the fix/#260_리뷰v2_메뉴에대한_api_수정 branch October 12, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 고치기

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants