Merged
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthrough개발 환경에서 주문 상태를 리셋할 수 있는 REST 엔드포인트가 추가되었습니다. 이를 위해 Order, Payment, Delivery 리포지토리에 삭제 메서드가 추가되었고, DevService에 상태 전이 로직이 구현되었으며, Swagger 설정이 활성화되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as 클라이언트
participant Controller as DevController
participant Service as DevService
participant OrderRepo as OrderRepository
participant PaymentRepo as PaymentRepository
participant DeliveryRepo as DeliveryRepository
participant DB as 데이터베이스
Client->>Controller: PATCH /dev/orders/{orderId}/status?status=X
Controller->>Service: resetOrderStatus(orderId, targetStatus)
Service->>OrderRepo: findById(orderId)
OrderRepo->>DB: SELECT Order
DB-->>OrderRepo: Order
OrderRepo-->>Service: Order
alt targetStatus == WAIT_PAY
Service->>PaymentRepo: deleteByOrder_Id(orderId)
PaymentRepo->>DB: DELETE Payment
Service->>DeliveryRepo: deleteByOrder_Id(orderId)
DeliveryRepo->>DB: DELETE Delivery
else targetStatus == WAIT_PAY_CHECK or PAID
Service->>DeliveryRepo: deleteByOrder_Id(orderId)
DeliveryRepo->>DB: DELETE Delivery
end
Service->>Service: order.updateStatus(targetStatus)
Service->>DB: UPDATE Order status
Service-->>Controller: void
Controller-->>Client: 200 OK ApiResponse
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 여러 도메인에 걸쳐 변경이 있으며, 상태 전이 로직의 조건부 삭제 부분이 비즈니스 요구사항과 일치하는지 확인이 필요합니다. Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing touches
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 관련 이슈
✨ 변경 사항
📸 테스트 증명 (필수)
📚 리뷰어 참고 사항
✅ 체크리스트
Summary by CodeRabbit
릴리스 노트
새로운 기능
개선사항
✏️ Tip: You can customize this high-level summary in your review settings.