Skip to content

[BUG] 지도 핀 조회 응답에 할인 정보 추가#364

Merged
taerimiiii merged 1 commit into
developfrom
bug/363-map-discount
Jun 17, 2026
Merged

[BUG] 지도 핀 조회 응답에 할인 정보 추가#364
taerimiiii merged 1 commit into
developfrom
bug/363-map-discount

Conversation

@taerimiiii

@taerimiiii taerimiiii commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

🔗 Related Issue

✨ 작업 개요

작업 내용을 간략하게 작성해주세요.

지도 핀 조회 응답에 할인 정보를 추가합니다.

  • GET /api/map/pins?swLat={남서_위도}&swLng={남서_경도}&neLat={북동_위도}&neLng={북동_경도}&category={카테고리} -> 현재화면 핀 조회
  • GET /api/map/clustering/pins?swLat={남서_위도}&swLng={남서_경도}&neLat={북동_위도}&neLng={북동_경도}&category={카테고리}&zoomLevel={줌레벨} -> 핀 클러스터링 조회

두 API에 할인정보가 추가되었습니다.

체크리스트

  • Reviewers, Assignees, Labels를 모두 등록했나요?
  • .gitignore 설정을 하였나요?
  • PR 머지 전 반드시 CI가 정상적으로 작동하는지 확인해주세요!

📷 이미지 첨부 (선택)

  • 작업 결과를 확인할 수 있는 이미지나 GIF를 첨부해주세요.
  • UI 변경, API 응답 샘플, 테스트 결과 등이 포함되면 좋아요!
image

🧐 집중 리뷰 요청

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요.

@taerimiiii taerimiiii requested a review from yaaan7 June 17, 2026 05:50
@taerimiiii taerimiiii self-assigned this Jun 17, 2026
@taerimiiii taerimiiii added the 🐞 bug 버그 수정 label Jun 17, 2026

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a discount field to map pins, updating the repository queries, view interfaces, DTOs, and mapping logic. The reviewer suggests introducing a common base interface (MapPinBaseView) for MapPinView and MapPinClusterView to eliminate duplicate mapping logic in MapPinQueryServiceImpl.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines 88 to 93
view.getLat(),
view.getLng(),
view.getDetailAddress(),
view.getRegion()
view.getRegion(),
view.getDiscount()
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

현재 MapPinViewMapPinClusterView는 대부분의 메서드(getPinId, getPinType, getLat, getLng, getDetailAddress, getRegion, getDiscount)를 공통으로 가지고 있습니다. 이로 인해 MapPinQueryServiceImpl에서 동일한 변환 로직을 가진 toDto 메서드가 중복으로 구현되어 있습니다.

공통 상위 인터페이스를 도입하여 중복 코드를 제거하고 유지보수성을 향상시키는 것을 제안합니다.

적용 예시:

  1. 공통 인터페이스 정의 (MapPinBaseView.java):
public interface MapPinBaseView {
    Long getPinId();
    String getPinType();
    Double getLat();
    Double getLng();
    String getDetailAddress();
    String getRegion();
    String getDiscount();
}
  1. 기존 인터페이스가 상속받도록 수정:
public interface MapPinView extends MapPinBaseView {}

public interface MapPinClusterView extends MapPinBaseView {
    Double getClusterLat();
    Double getClusterLng();
}
  1. MapPinQueryServiceImpl에서 단일 toDto 메서드로 통합:
private MapPinResDTO.PinItemDTO toDto(MapPinBaseView view) {
    return new MapPinResDTO.PinItemDTO(
            view.getPinId(),
            view.getPinType(),
            view.getLat(),
            view.getLng(),
            view.getDetailAddress(),
            view.getRegion(),
            view.getDiscount()
    );
}

@yaaan7 yaaan7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🫶👍🙂‍↕️

@taerimiiii taerimiiii merged commit 9e24b4b into develop Jun 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 지도 핀 조회에 할인정보 추가

2 participants