Skip to content
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

feat: 장바구니 조회 기능 구현 #44

Merged
merged 3 commits into from
Nov 19, 2024
Merged

feat: 장바구니 조회 기능 구현 #44

merged 3 commits into from
Nov 19, 2024

Conversation

LEEJaeHyeok97
Copy link
Member

@LEEJaeHyeok97 LEEJaeHyeok97 commented Nov 19, 2024

  • 🔀 PR 제목의 형식을 잘 작성했나요? e.g. [feat] PR을 등록한다.
  • 💯 테스트는 잘 통과했나요?
  • 🏗️ 빌드는 성공했나요?
  • 🧹 불필요한 코드는 제거했나요?
  • 💭 이슈는 등록했나요?
  • 🏷️ 라벨은 등록했나요?

작업 내용

주의사항

Summary by CodeRabbit

  • 새로운 기능
    • 사용자 ID를 기반으로 장바구니 항목을 검색하는 기능 추가.
    • 장바구니 항목을 추가하는 API 경로가 /cart에서 /carts로 변경됨.
  • 버그 수정
    • 사용자 ID가 없을 경우 NullPointerException 처리 추가.
  • 문서화
    • API 문서에 새로운 장바구니 항목 검색 메서드에 대한 설명 추가.

* feat: 장바구니 추가 기능 구현

* feat: 장바구니 조회 기능 구현
Copy link

coderabbitai bot commented Nov 19, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

이 풀 리퀘스트는 OrderService, CartRepository, CartResponse, 및 OrderController 클래스에 여러 가지 변경 사항을 포함하고 있습니다. OrderService에 새로운 메서드 getCartItems가 추가되어 사용자 ID에 따라 장바구니 항목을 검색합니다. CartRepository에는 사용자와 연관된 장바구니를 찾기 위한 findAllByUser 메서드가 추가되었습니다. CartResponse는 장바구니 응답을 캡슐화하는 새로운 레코드 클래스를 도입합니다. 마지막으로, OrderController는 장바구니 항목을 검색하는 새로운 엔드포인트를 추가하고 기존 엔드포인트의 URL 경로를 수정했습니다.

Changes

파일 경로 변경 요약
src/main/java/com/jangburich/domain/order/application/OrderService.java - 메서드 추가: public CartResponse getCartItems(String userProviderId)
src/main/java/com/jangburich/domain/order/domain/repository/CartRepository.java - 메서드 추가: List<Cart> findAllByUser(User user)
src/main/java/com/jangburich/domain/order/dto/response/CartResponse.java - 레코드 추가: public record CartResponse(...)
- 메서드 추가: public static CartResponse of(...)
- 레코드 추가: public record GetCartItemsResponse(...)
- 메서드 추가: public static GetCartItemsResponse of(...)
src/main/java/com/jangburich/domain/order/presentation/OrderController.java - 메서드 추가: public ResponseCustom<CartResponse> getCartItems(Authentication authentication)
- URL 경로 변경: @PostMapping("/cart")@PostMapping("/carts")

Possibly related PRs

  • Develop #23: OrderService 클래스의 변경 사항은 사용자 관리 및 검색 프로세스와 개념적으로 연결되어 있으며, OAuthUserService 클래스와 관련이 있습니다.

Poem

🐇
장바구니에 담긴 소중한 것들,
사용자와 함께하는 즐거운 길,
새로운 메서드로 찾아가고,
응답은 항상 기쁜 마음으로,
카트의 비밀을 함께 나누며,
우리 모두의 행복한 쇼핑길! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@LEEJaeHyeok97 LEEJaeHyeok97 merged commit 347f018 into main Nov 19, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant