Skip to content

Conversation

@ggamnunq
Copy link
Contributor

@ggamnunq ggamnunq commented Sep 4, 2025

홈화면 큐레이션 API 구현

  • 홈화면 큐레이션 조회 API 구현 -> 관광지 1개, 축제 2개 조회
  • FestivalUtil 클래스에 Date 클래스 -> 날짜만 구하는 메서드 작성

좋아요 관련 리팩토링

  • 홈화면 좋아요한 데이터 좋아요 표시 안 되는 문제 해결
  • 좋아요 테이블 키 단일키 -> 복합키 방식으로 변경 ( LikeId 클래스 작성 )

Cors 문제 해결

  • SecurityConfig 파일 cors 설정 PATCH 누락 수정

엔티티 생성 문제 해결

  • Entity, MappedSuperClass, Embeddable 어노테이션 붙은 클래스는 open 클래스로 자동 설정되도록 환경 설정

Summary by CodeRabbit

  • 신규 기능
    • 홈 큐레이션 조회 API 추가: 랜덤 명소 1개와 축제 2개를 기간·이미지와 함께 제공
  • 개선
    • 날짜에서 시간 제거로 기간 표기 가독성 향상
    • 이미지가 있는 명소/축제 우선 조회로 썸네일 노출 개선
    • CORS에 PATCH 메서드 허용으로 클라이언트 호환성 확대
  • API 변경
    • 축제 목록 응답의 id가 null 가능(Long?)으로 변경 (클라이언트 처리 필요)

@ggamnunq ggamnunq self-assigned this Sep 4, 2025
@coderabbitai
Copy link

coderabbitai bot commented Sep 4, 2025

Walkthrough

빌드에서 Hibernate 코어 의존성을 비활성화하고 Kotlin allOpen/noArg 설정을 추가했습니다. 페스티벌/플레이스 좋아요 엔티티의 open 제거 및 복합키 제네릭 정정, DTO 일부 필드 nullable 변경, 새 JPQL 메서드 추가, 홈 큐레이션 API(컨트롤러·서비스·컨버터·DTO·유틸) 추가, CORS에 PATCH 허용, 리프레시 토큰 저장 시 userId nullable 허용이 포함됩니다.

Changes

Cohort / File(s) Summary
Build config
build.gradle
Hibernate 코어 의존성 주석 처리. Kotlin allOpen/noArg에 Jakarta Persistence 애너테이션 등록.
Festival domain models
.../festival/domain/Festival.kt, .../festival/domain/FestivalLike.kt, .../festival/domain/FestivalLikeId.kt
불필요 import 정리 및 클래스의 open 제거로 final 처리. 기능 로직 변화 없음.
Festival DTO
.../festival/dto/FestivalListResponseDTO.kt
FestivalInfoDto.id 타입을 LongLong?로 변경.
Repositories (likes + image queries)
.../festival/repository/FestivalLikesRepository.kt, .../place/repository/PlaceLikeRepository.kt, .../festival/repository/FestivalRepository.kt, .../place/repository/PlaceRepository.kt
좋아요 리포지토리의 ID 제네릭을 복합키 타입으로 변경. 이미지가 존재하는 엔티티 조회 JPQL 메서드 2개 추가.
Home curation feature
.../home/controller/HomeController.kt, .../home/service/HomeQueryService.kt, .../home/dto/HomeResponseDTO.kt, .../home/converter/CurationConverter.kt, .../festival/util/FestivalDateUtil.kt
홈 큐레이션 GET API 추가. 서비스에 페스티벌 리포지토리 주입 및 조회/검증 로직 추가. 응답 DTO 2종, 컨버터, 날짜 유틸 신규.
Place domain model
.../place/domain/PlaceLike.kt
클래스의 open 제거로 final 처리.
User refresh token
.../user/repository/RefreshTokenRepository.kt
saveTokenuserId 파라미터를 nullable로 변경.
Security config
.../global/config/security/SecurityConfig.kt
CORS 허용 메서드에 PATCH 추가.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant HC as HomeController
  participant HQS as HomeQueryService
  participant PR as PlaceRepository
  participant FR as FestivalRepository
  participant CC as CurationConverter
  participant AR as ApiResponse

  Client->>HC: GET /api/home/curation
  HC->>HQS: getCurations()
  HQS->>PR: findPlaceImageNotNull()
  PR-->>HQS: List<Place>
  alt insufficient places
    HQS-->>HC: throw PLACE_NOT_FOUND
    HC-->>Client: Error response
  else sufficient
    HQS->>FR: findFestivalImageNotNull()
    FR-->>HQS: List<Festival>
    alt insufficient festivals
      HQS-->>HC: throw FESTIVAL_NOT_FOUND
      HC-->>Client: Error response
    else sufficient
      HQS->>CC: toListDto(places, festivals)
      CC-->>HQS: CurationList
      HQS-->>HC: CurationList
      HC->>AR: onSuccess(CurationList)
      AR-->>Client: 200 OK + payload
    end
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

새 아침 큐레이션, 톡-톡 튀는 빛,
토끼는 귀 세워 한 장면씩 집었지.
한 곳, 두 축제—사진 첫 장 찰칵!
날짜는 싹싹 시간은 쓱싹.
패치도 통과, 좋아요 키도 정돈 완료!
깡총—홈으로 행복 배달 완료. 🥕✨


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5633140 and c2bc748.

📒 Files selected for processing (17)
  • build.gradle (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/domain/Festival.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/domain/FestivalLike.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/domain/FestivalLikeId.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/dto/FestivalListResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalLikesRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/util/FestivalDateUtil.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/home/controller/HomeController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/home/converter/CurationConverter.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/home/dto/HomeResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/home/service/HomeQueryService.kt (3 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/domain/PlaceLike.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceLikeRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/repository/RefreshTokenRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/global/config/security/SecurityConfig.kt (1 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ggamnunq ggamnunq merged commit 3771819 into main Sep 4, 2025
2 checks passed
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.

2 participants