Skip to content

Conversation

@7ijin01
Copy link
Member

@7ijin01 7ijin01 commented Sep 15, 2025

📌 PR 개요

  • imageUrl, tourspotId 추가

✅ 변경사항


🔍 체크리스트

  • PR 제목은 명확한가요?
  • 관련 이슈가 있다면 연결했나요?
  • 로컬 테스트는 통과했나요?
  • 코드에 불필요한 부분은 없나요?

📎 관련 이슈

Closes #87


💬 기타 참고사항

Summary by CodeRabbit

  • 신규 기능
    • 관광지 상세 화면에 대표 이미지와 관광지 ID가 추가되어 장소 정보를 더 풍부하게 확인할 수 있습니다. 이미지가 등록된 관광지는 상세에서 바로 확인 가능하며, 목록/검색 흐름과 화면 로딩 성능은 기존과 동일합니다.
  • 작업(Chores)
    • 릴리스 자동화 워크플로우 트리거를 메인 브랜치 기준으로 정리해 배포 파이프라인의 일관성을 개선했습니다. 사용자 기능에는 영향이 없습니다.

@7ijin01 7ijin01 merged commit b75df5e into main Sep 15, 2025
1 of 2 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Sep 15, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

GitHub Actions release workflow trigger changed to branch main. TourSpotDetailResponse now includes tourspotId and imageUrl. TourSpotDetailMapper’s toResponse signature adds imageUrl and maps it. TourSpotService injects TourSpotImageRepository, fetches image URL, throws if missing, and passes imageUrl to the mapper.

Changes

Cohort / File(s) Summary of changes
Workflow trigger update
.github/workflows/release.yml
Push trigger branch changed from feat/#85-logout to main.
DTO expansion
src/main/java/.../tourspot/dto/response/TourSpotDetailResponse.java
Added fields: tourspotId: Long, imageUrl: String; Lombok accessors implied.
Mapper signature + mapping
src/main/java/.../tourspot/mapper/TourSpotDetailMapper.java
Updated toResponse signature to include imageUrl; maps imageUrl to response.
Service integration of images
src/main/java/.../tourspot/service/TourSpotService.java
Injected TourSpotImageRepository; in combineTourSpotDetail fetches image by tour spot, throws GlobalException(ErrorStatus.TOURSPOT_NOT_FOUND) if absent; passes imageUrl to mapper.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Controller/Caller
  participant S as TourSpotService
  participant IR as TourSpotImageRepository
  participant M as TourSpotDetailMapper
  participant R as TourSpotDetailResponse

  C->>S: getTourSpotDetail(tourSpotId)
  S->>IR: findByTourSpot(tourSpot)
  alt Image found
    IR-->>S: TourSpotImage (url)
    S->>M: toResponse(tourSpot, imageUrl, address, congestion, events, tags, monthly)
    M-->>S: TourSpotDetailResponse
    S-->>C: Response (includes tourspotId, imageUrl)
  else Image missing
    S-->>C: throw GlobalException(TOURSPOT_NOT_FOUND)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

귀가 쫑긋, 코드 밭을 폴짝폴짝—
사진 URL 챙겨, 관광지 ID도 착!
매퍼는 살짝, 서비스는 살뜰히
없는 사진엔 예외가 딱—참 깔끔하지!
오늘도 배포는 메인으로 휙! 🐇✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#87-image-tourspotId

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c192a8a and 8011744.

📒 Files selected for processing (4)
  • .github/workflows/release.yml (1 hunks)
  • src/main/java/com/opendata/domain/tourspot/dto/response/TourSpotDetailResponse.java (1 hunks)
  • src/main/java/com/opendata/domain/tourspot/mapper/TourSpotDetailMapper.java (1 hunks)
  • src/main/java/com/opendata/domain/tourspot/service/TourSpotService.java (3 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

[feat] 선호관광지 조회 시 사진url 및 관광지 id 필드 추가

2 participants