-
Notifications
You must be signed in to change notification settings - Fork 0
[FIX/#136] 기존 API들에서 ACTIVE 상태인 장소만 조회 로직에 포함되도록 수정 #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
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.
| @Param("spotStatus") String spotStatus | |
| @Param("spotStatus") SpotStatus spotStatus |
| 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 |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
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.
💡 Issue
📄 Description