feat: 현재 영업 중인 상점 수 조회 API 추가#2271
Conversation
- 상점 목록 전체를 내려받지 않아도 현재 영업 중인 상점 수만 조회할 수 있도록 별도 API를 추가 - 기존 상점 영업 여부 기준과 어긋나지 않도록 현재 요일과 이전 요일의 심야 영업 케이스를 함께 고려 - 인수 테스트를 추가해 고정 시각 기준으로 오픈 상점 수 응답 계약을 검증
|
Warning Review limit reached
More reviews will be available in 52 minutes and 19 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
- 신규 영업 중 상점 수 조회 API의 Swagger 응답 정의를 기존 @ApiResponses 대신 @ApiResponseCodes로 통일했습니다. - CallvanApi와 같은 정적 import 방식을 적용해 응답 코드 선언을 간결하게 유지했습니다. - 더 이상 사용하지 않는 직접 ApiResponseCode import를 제거해 리뷰에서 지적된 불필요한 코드가 남지 않도록 했습니다.
🔍 개요
/shops목록 응답의is_open과 같은 시간표 기준을 사용해, 목록 전체를 내려받지 않아도 현재 오픈 가게 수를 확인할 수 있습니다.🚀 주요 변경 내용
GET /shops/open/countAPI 추가shop_opens의 오늘 요일 행과 전날부터 이어지는 심야 영업 행을 함께 고려해 현재 영업 중인 상점 수 계산COUNT(DISTINCT shop_id)로 중복 집계 방지💬 참고 사항
00:00 ~ 00:00은 기존Shop.isOpen()로직과 동일하게 자정을 넘기는 영업시간으로 해석되어 24시간 영업처럼 카운트됩니다../gradlew compileJava testClasses --no-daemon,./gradlew test --tests in.koreatech.koin.acceptance.domain.ShopApiTest --no-daemon✅ Checklist (완료 조건)