Skip to content

feat: 현재 영업 중인 상점 수 조회 API 추가#2271

Merged
dh2906 merged 3 commits into
developfrom
feat/2269-open-shops-count
May 27, 2026
Merged

feat: 현재 영업 중인 상점 수 조회 API 추가#2271
dh2906 merged 3 commits into
developfrom
feat/2269-open-shops-count

Conversation

@dh2906
Copy link
Copy Markdown
Contributor

@dh2906 dh2906 commented May 27, 2026

🔍 개요

  • 현재 영업 중인 상점 수만 조회할 수 있는 API를 추가했습니다.
  • 기존 /shops 목록 응답의 is_open과 같은 시간표 기준을 사용해, 목록 전체를 내려받지 않아도 현재 오픈 가게 수를 확인할 수 있습니다.

🚀 주요 변경 내용

  • GET /shops/open/count API 추가
  • 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 (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

Compound Engineering
Codex

- 상점 목록 전체를 내려받지 않아도 현재 영업 중인 상점 수만 조회할 수 있도록 별도 API를 추가
- 기존 상점 영업 여부 기준과 어긋나지 않도록 현재 요일과 이전 요일의 심야 영업 케이스를 함께 고려
- 인수 테스트를 추가해 고정 시각 기준으로 오픈 상점 수 응답 계약을 검증
@github-actions github-actions Bot added the 기능 새로운 기능을 개발합니다. label May 27, 2026
@github-actions github-actions Bot requested review from ImTotem and Soundbar91 May 27, 2026 03:11
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Warning

Review limit reached

@dh2906, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 294a0609-198f-4037-8d7a-89784f84ed62

📥 Commits

Reviewing files that changed from the base of the PR and between 872c03b and a28e343.

📒 Files selected for processing (6)
  • src/main/java/in/koreatech/koin/domain/shop/controller/ShopApi.java
  • src/main/java/in/koreatech/koin/domain/shop/controller/ShopController.java
  • src/main/java/in/koreatech/koin/domain/shop/dto/shop/response/OpenShopsCountResponse.java
  • src/main/java/in/koreatech/koin/domain/shop/repository/shop/ShopRepository.java
  • src/main/java/in/koreatech/koin/domain/shop/service/ShopService.java
  • src/test/java/in/koreatech/koin/acceptance/domain/ShopApiTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/2269-open-shops-count

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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Unit Test Results

659 tests   656 ✔️  1m 22s ⏱️
163 suites      3 💤
163 files        0

Results for commit a28e343.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Collaborator

@Soundbar91 Soundbar91 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다

Comment thread src/main/java/in/koreatech/koin/domain/shop/controller/ShopApi.java Outdated
Copy link
Copy Markdown
Collaborator

@DHkimgit DHkimgit left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

Comment thread src/main/java/in/koreatech/koin/domain/shop/controller/ShopApi.java
- 신규 영업 중 상점 수 조회 API의 Swagger 응답 정의를 기존 @ApiResponses 대신 @ApiResponseCodes로 통일했습니다.
- CallvanApi와 같은 정적 import 방식을 적용해 응답 코드 선언을 간결하게 유지했습니다.
- 더 이상 사용하지 않는 직접 ApiResponseCode import를 제거해 리뷰에서 지적된 불필요한 코드가 남지 않도록 했습니다.
@dh2906 dh2906 merged commit 8b51f3e into develop May 27, 2026
6 checks passed
@dh2906 dh2906 deleted the feat/2269-open-shops-count branch May 27, 2026 05:20
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.

현재 영업중인 가게 개수 조회 API 추가

3 participants