Skip to content

Conversation

@Chuseok22
Copy link
Member

@Chuseok22 Chuseok22 commented Jan 2, 2026

✨ 변경 사항


✅ 테스트


  • 수동 테스트 완료
  • 테스트 코드 완료

Summary by CodeRabbit

신규 기능

  • 장바구니에 총 수량 표시 기능이 추가되었습니다. 사용자는 이제 장바구니에 담긴 모든 상품의 총 개수를 명확하게 확인할 수 있습니다. 장바구니 조회 및 상품 추가·변경 시에도 실시간으로 업데이트되는 정확한 총 수량 정보가 제공됩니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@Chuseok22 Chuseok22 self-assigned this Jan 2, 2026
@Chuseok22 Chuseok22 added the enhancement 기능 개선/향상 (Enhancement) label Jan 2, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 2, 2026

Caution

Review failed

The pull request is closed.

워크스루

장바구니 응답에 총 수량을 나타내는 새로운 totalQuantity 필드가 추가되었습니다. 이 필드는 CartResponse DTO에 선언되고, CartService의 updateCartItem과 getCart 메서드에서 장바구니 항목의 수량 합계로 계산되어 반환됩니다.

변경 사항

코호트 / 파일(들) 변경 요약
DTO 필드 확장
src/main/java/com/campustable/be/domain/cart/dto/CartResponse.java
장바구니 총 수량을 나타내는 private int totalQuantity 필드 추가. Lombok 어노테이션으로 접근자 자동 생성
CartService 통합
src/main/java/com/campustable/be/domain/cart/service/CartService.java
updateCartItem 및 getCart 메서드에서 totalQuantity를 계산하여 CartResponse 빌더에 설정. CartItemDto 수량 합계로 계산

예상 코드 리뷰 노력

🎯 2 (Simple) | ⏱️ ~8 minutes

연관된 PR

  • 20251107 #17 cart domain crud기능추가 #52: CartService.java 수정 — 본 PR은 CartResponse에 totalQuantity 연결을 추가하며, 해당 PR은 Cart.getCartId() 접근자 변경 사항을 포함하여 서로 관련이 있습니다.

🐰 장바구니에 수량을 세어 담고,
총량을 한눈에 보게 되네!
필드 하나 더해 기능 완성,
깔끔한 코드로 기쁜 마음 ✨

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85b9d22 and 8a5a257.

📒 Files selected for processing (2)
  • src/main/java/com/campustable/be/domain/cart/dto/CartResponse.java
  • src/main/java/com/campustable/be/domain/cart/service/CartService.java

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.

@Chuseok22 Chuseok22 merged commit cadac52 into test Jan 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 기능 개선/향상 (Enhancement)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 [기능개선][DTO] 장바구니 반환값 int totalQuantity 추가

3 participants