-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: 상품 목록 조회 필드 추가 #57
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
WalkthroughProductListResponse에 sellerRating과 reviewsCount가 추가되었고, 리포지토리 조회(getAllProducts)에서 리뷰 기반의 평균 평점과 리뷰 수를 서브쿼리로 계산해 프로젝션에 포함했습니다. 리뷰 도메인과 DTO의 rating 타입이 Long에서 Double로 변경되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant S as ProductService
participant R as CustomProductRepositoryImpl
participant DB as Database
C->>S: getAllProducts(query)
S->>R: fetch products with projections
R->>DB: SELECT products + joins (user, image)
DB-->>R: product rows
rect rgba(200,230,255,0.3)
note over R: For each product
R->>DB: SUBQUERY avg(review.rating) WHERE targetUserId=user.id AND productId=product.id
DB-->>R: sellerRating (avg or 0.0)
R->>DB: SUBQUERY count(review) WHERE targetUserId=product.user.id AND productId=product.id
DB-->>R: reviewsCount
end
R-->>S: List<ProductListResponse>(... sellerRating, reviewsCount ...)
S-->>C: Response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🔇 Additional comments (13)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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 |
What is this PR?🔍
Changes💻
ScreenShot📷
Summary by CodeRabbit
신기능
개선