-
Notifications
You must be signed in to change notification settings - Fork 0
feat(Store,Reservation): 예약 많은/적은순 정렬 로직 개 #152
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
The head ref may contain hidden characters: "feature/#147-store\uB300\uAE30\uC778\uC6D0\uC21C\uC815\uB82C"
Conversation
- 최대 5개 store만 호출 - waitingUserRsponse에 reservationId 추가
Walkthrough이 변경사항은 두 서비스 클래스의 내부 메서드 로직을 개선한 것입니다. ReservationService에서는 대기 사용자 상세 정보를 조회할 때 데이터베이스 쿼리를 하나로 통합했고, StoreServiceImpl에서는 대기 인원 기준으로 정렬된 상위 5개 매장만 반환하도록 변경되었습니다. 외부 인터페이스 시그니처에는 변경이 없습니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/reservation/service/ReservationService.java (1)
122-122: 불필요한 빈 줄을 제거하세요.-
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/reservation/service/ReservationService.java(3 hunks)nowait-app-user-api/src/main/java/com/nowait/applicationuser/store/service/StoreServiceImpl.java(1 hunks)
🔇 Additional comments (3)
nowait-app-user-api/src/main/java/com/nowait/applicationuser/store/service/StoreServiceImpl.java (1)
246-248: 상위 5개 매장 제한 로직이 올바르게 구현되었습니다.정렬 후
.limit(5)를 적용하여 대기 인원 기준으로 상위 5개 매장만 반환하도록 변경된 것이 PR 목표와 일치합니다.nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/reservation/service/ReservationService.java (2)
98-109: 데이터베이스 쿼리 최적화 및 reservationId 추가가 잘 구현되었습니다.단일 쿼리를 사용하여 사용자 정보와 예약 정보를 함께 조회하도록 개선되었고, PR 목표에 따라 reservationId가 응답에 포함되었습니다. Optional 처리를 통해 예약이 존재하지 않는 경우도 안전하게 처리됩니다.
112-112: reservationId가 응답 객체에 올바르게 추가되었습니다.null 체크를 통해 reservationId를 문자열로 변환하거나 null을 반환하는 로직이 적절합니다.
작업 요약
Issue Link
문제점 및 어려움
해결 방안
Reference
Summary by CodeRabbit
버그 수정
기능 개선