Skip to content

Conversation

@lovelyAlien
Copy link
Collaborator

주요 변경 사항

  • 코스(루트) 상세 조회 API 및 관련 서비스/DTO 신규 구현
    • RouteController, RouteFacade, RouteDetailDto 등 추가
    • 장소, 리뷰, 사진 등 연관 데이터 효율적 조회 및 응답 구조 설계
  • 장소/사진/리뷰 관련 서비스 및 쿼리 개선
    • PhotoService, PlaceReviewService 등 기능 확장 및 쿼리 최적화
    • AlbumFacade, DateSchedService 등 네이밍 및 쿼리 정리
  • 검색(Search) 서비스 내부 루트 검색 로직 리팩토링
    • SearchFacade에서 RouteService 의존성 제거 및 실제 동작에 맞게 테스트 코드 수정
  • 불필요/이전 테스트 코드 삭제

관련 이슈

Closes #308

jaeseung choun added 5 commits December 22, 2025 17:07
- DateSchedule과 Route의 양방향 관계를 OneToOne으로 재정의
- Route에서 불필요한 dateSchedules List 제거
- RoutePlace의 cascade 옵션 정리 및 OnDelete 어노테이션 제거
- DateSchedule과 Route 생성을 위한 팩토리 메서드 추가
- Route 복제 및 Place 관리 메서드 추가
- RouteController에 상세 조회 엔드포인트 및 RouteFacade 신규 도입
- RouteDetailDto 등 응답 구조를 위한 DTO 추가
- AlbumFacade, DateSchedService 등 연관 서비스 네이밍 및 쿼리 정리
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @lovelyAlien, 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!

이 Pull Request는 코스 상세 조회 기능을 새롭게 추가하고, 기존 검색 서비스의 내부 로직을 리팩토링하여 전반적인 데이터 조회 효율성과 시스템 아키텍처의 명확성을 개선합니다. 특히, 코스에 포함된 장소, 사진, 리뷰 등의 연관 데이터를 더욱 효율적으로 가져오고 응답 구조를 최적화함으로써 사용자 경험을 향상시키는 데 중점을 두었습니다. 또한, 서비스 간의 의존성을 줄이고 불필요한 코드를 정리하여 유지보수성을 높였습니다.

Highlights

  • 코스 상세 조회 기능 추가: 코스(루트) 상세 정보를 조회하는 새로운 API와 관련 서비스 및 DTO가 구현되었습니다.
  • 연관 데이터 조회 효율화: 장소, 리뷰, 사진 등 코스와 연관된 데이터를 효율적으로 조회하고 응답하는 구조가 설계되었습니다.
  • 서비스 및 쿼리 개선: PhotoService, PlaceReviewService 등 장소/사진/리뷰 관련 서비스의 기능이 확장되고 쿼리가 최적화되었습니다.
  • 검색 서비스 리팩토링: SearchFacade에서 RouteService의 직접적인 의존성을 제거하고, 루트 검색 로직이 리팩토링되었습니다.
  • 불필요 코드 정리: 기존의 불필요하거나 오래된 테스트 코드가 삭제되었습니다.
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.

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
Contributor

@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

코스 상세 조회 기능 추가와 검색 서비스 리팩토링을 위한 PR 잘 보았습니다. 전반적으로 도메인 객체의 역할을 강화하고 서비스 간의 책임을 명확히 분리하려는 노력이 돋보입니다. 특히 RouteFacade를 도입하여 복잡한 조회 로직을 처리하고, RouteServiceSearchFacade의 역할을 재정의한 점이 인상적입니다. 제안드린 RouteFacade에서 발생할 수 있는 N+1 쿼리 문제, DateSchedService의 데이터 로딩 방식, 테스트 코드 보완 등에 대한 의견을 확인 부탁드립니다.

Comment on lines +109 to +113
Route sourceRoute = routeRepository.findById(sourceRouteId)
.orElseThrow(() -> new BusinessException(RouteErrorCode.NOT_FOUND));

// RoutePlace 함께 로딩 (복제를 위해)
sourceRoute.getRoutePlaces().size(); // 초기화
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

지연 로딩된 컬렉션을 초기화하기 위해 .size()를 호출하는 방식은 유효하지만, 데이터 로딩 시점을 명확하게 제어하기 위해 RouteRepositoryJOIN FETCH를 사용한 메서드를 추가하는 것을 고려해볼 수 있습니다. 예를 들어, findByIdWithRoutePlaces와 같은 메서드를 만들어 RouteRoutePlace를 함께 조회하면, 서비스 코드에서 컬렉션 초기화를 위한 별도 호출 없이도 N+1 문제 없이 안전하게 연관 엔티티를 사용할 수 있습니다. 이렇게 하면 데이터 조회 로직이 리포지토리에 캡슐화되어 서비스 로직이 더 깔끔해집니다.

@lovelyAlien lovelyAlien merged commit 599300a into main Dec 28, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

코스 상세 조회 API

2 participants