Skip to content

Conversation

@ckkim817
Copy link
Member

@ckkim817 ckkim817 commented Oct 3, 2025

💡 Issue

📄 Description

  • 기존 API들에서 ACTIVE 상태인 장소만 조회 로직에 포함되도록 수정했습니다.

@ckkim817 ckkim817 requested a review from Copilot October 3, 2025 21:21
@ckkim817 ckkim817 self-assigned this Oct 3, 2025
@ckkim817 ckkim817 added 🛠️ FIX 버그, 오류 등을 수정 🐈‍⬛ 창균 size/XS labels Oct 3, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a data consistency issue by ensuring only ACTIVE status spots are returned from various spot-related APIs. This prevents users from accessing spots that may be inactive or deleted.

  • Updated repository methods to filter by SpotStatus.ACTIVE
  • Added status validation in service layer methods
  • Modified native queries to include spot_status conditions

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
SpotRepository.java Updated query methods and native SQL to filter by ACTIVE status
SpotNativeQueryRepository.java Added ACTIVE status filter to spot list queries
SpotService.java Added status validation and updated search methods to use ACTIVE filter
GuidedSpotCustomRepository.java Added ACTIVE status condition to guided spot suggestions query
MemberService.java Added ACTIVE status check when mapping saved spots

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Param("keyword") String keyword,
@Param("limit") int limit
@Param("limit") int limit,
@Param("spotStatus") String spotStatus
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The parameter type should be SpotStatus enum instead of String to maintain type safety and consistency with other methods in the same class.

Suggested change
@Param("spotStatus") String spotStatus
@Param("spotStatus") SpotStatus spotStatus

Copilot uses AI. Check for mistakes.
Comment on lines +47 to +53
AND spot_status = :spotStatus
LIMIT :limit
""", nativeQuery = true)
List<SpotEntity> findByNameContainingWithLimitIgnoreCase(
@Param("keyword") String keyword,
@Param("limit") int limit
@Param("limit") int limit,
@Param("spotStatus") String spotStatus
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The native query expects a String parameter but SpotStatus enum will be passed. Either change the parameter type to String or use spotStatus.name() when calling this method.

Copilot uses AI. Check for mistakes.
@ckkim817 ckkim817 merged commit 9d653d8 into develop Oct 3, 2025
1 check passed
@ckkim817 ckkim817 deleted the fix/#136 branch October 3, 2025 22:17
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.

[FIX] 기존 API들에서 ACTIVE 상태인 장소만 조회 로직에 포함되도록 수정

2 participants