Refactor: 날짜별 매출 조회 기능 구현 및 주점 랭킹 내 주문 건수 필드 추가#144
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. """ Walkthrough이번 변경에서는 매장별 매출 합계 조회 기능이 특정 날짜를 기준으로 동작하도록 수정되었으며, 관련 서비스·컨트롤러·레포지토리 계층의 메서드 시그니처가 일괄적으로 변경되었습니다. 또한, 매장 랭킹 DTO에 주문 건수 필드가 추가되고, 랭킹 산출 시 주문 건수 집계 로직이 반영되었습니다. 스케줄러의 실행 주기도 5분마다로 조정되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant StatisticsController
participant OrderService
participant StatisticCustomRepository
Client->>StatisticsController: GET /sales?date=YYYY-MM-DD
StatisticsController->>OrderService: getSaleSumByStoreId(memberDetails, date)
OrderService->>StatisticCustomRepository: findSalesSumByStoreId(storeId, date)
StatisticCustomRepository-->>OrderService: OrderSalesSumDetail
OrderService-->>StatisticsController: OrderSalesSumDetail
alt 매출 데이터가 모두 0원
StatisticsController-->>Client: "해당 날짜에 매출 데이터 없음" 메시지
else
StatisticsController-->>Client: 매출 데이터 반환
end
sequenceDiagram
participant RankingRefreshScheduler
participant RankingServiceImpl
participant StatisticCustomRepository
RankingRefreshScheduler->>RankingServiceImpl: getStatisticsRankings(memberDetails)
RankingServiceImpl->>StatisticCustomRepository: findOrderCountByStoreIds(storeIds)
RankingServiceImpl->>StatisticCustomRepository: (기존) 매장 정보 조회
RankingServiceImpl-->>RankingRefreshScheduler: StoreRankingDto(orderCount 포함)
Estimated code review effort4 (~80분) Suggested reviewers
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 (
|
작업 요약
날짜별 매출 조회 기능 구현 및 주점 랭킹 내 주문 건수 필드 추가
Issue Link
#141
문제점 및 어려움
해결 방안
Reference
Summary by CodeRabbit
신규 기능
버그 수정
개선 사항
문서화