Skip to content

feat: 사장님 주문 상태 변경 API 추가 - #2443

Merged
Soundbar91 merged 9 commits into
feature/2438-owner-order-list-detailfrom
feature/2442-owner-order-status-transition
Sep 22, 2026
Merged

Soundbar91 merged 9 commits into
feature/2438-owner-order-list-detailfrom
feature/2442-owner-order-status-transition

Conversation

@Soundbar91

Copy link
Copy Markdown
Collaborator

🔍 개요


🚀 주요 변경 내용

  • PATCH /owner/shops/{orderableShopId}/orders/{orderId}/status — 변경할 상태를 요청 바디로 받아 주문 상태를 전이합니다.
    • COOKING 승인, 예상 소요 시간을 받아 도착 예정 시각을 정합니다.
    • CANCELED 반려, 사유를 받고 결제를 전액 취소합니다.
    • DELIVERING 조리 완료, DELIVERED 배달 완료.

💬 참고 사항


✅ Checklist (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

POS 화면의 승인, 반려, 조리 완료, 배달 완료 버튼을 처리한다.
전이마다 엔드포인트를 두는 대신 목표 상태를 요청 바디로 받아 하나로 합쳤다.
허용 전이를 OrderStatus가 알도록 하여 어느 경로로 들어오든 동일하게 막는다.
반려는 결제 전액 취소까지 함께 수행한다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Soundbar91 Soundbar91 self-assigned this Sep 21, 2026
@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 676dd558-dc0d-4731-b1a3-3c1726bba175

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions github-actions Bot added Team Business 비즈니스 팀에서 작업할 이슈입니다 기능 새로운 기능을 개발합니다. labels Sep 21, 2026
Soundbar91 and others added 2 commits September 21, 2026 21:22
POS 화면의 영업 시작, 영업 종료 버튼을 처리한다.
shop_operation.is_open 컬럼은 있었으나 이를 변경하는 코드가 없어
사장님이 직접 영업을 여닫을 방법이 없었다.
주문 가능 상점으로 설정되지 않은 상점은 변경할 수 없다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
POS의 다른 API가 모두 orderableShopId를 받는데 영업 토글만 shopId를 받아
클라이언트가 식별자 두 개를 관리해야 했다. 주문 가능 상점 기준으로 받고
컨트롤러와 서비스도 주문 도메인에 둔다.
연관관계 탐색은 OrderableShop.changeOpenStatus 안에 가둔다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Soundbar91 and others added 6 commits September 21, 2026 21:38
/owner/shops/{id}는 shopId를 받는데 POS API는 같은 자리에서
orderableShopId를 받아, 다른 종류의 식별자가 한 경로에 섞여 있었다.
둘 다 작은 정수라 잘못 넣어도 조용히 다른 가게가 조회될 수 있다.
고객용 /order/shop/{orderableShopId}와 같은 형태로 맞춰 구분한다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
POS 로그인 후 매장 선택 화면에 필요한 목록을 반환한다.
기존 /owner/shops는 shopId와 이름만 내려주어 이후 POS API에 필요한
orderable_shop_id와 주소, 영업 여부를 얻을 수 없었다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
목록과 상세 응답에 order_type을 추가한다.
기존 구현은 배달 정보를 널 검사 없이 꺼내 포장 주문이 들어오면 터졌고,
완료 탭에 포장 완료와 포장 수령이 빠져 있어 포장 주문이 조리중 이후
어느 탭에도 보이지 않았다.

유형별 연관관계 탐색을 Order 안으로 옮기고, 각 유형이 가질 수 있는 상태를
OrderType이 알도록 하여 유형에 맞지 않는 전이를 막는다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…onse

feat: 주문 응답에 배달/포장 유형 추가하고 포장 주문 처리
feat: 사장님 전용 주문 가능상점 조회 API 추가
feat: 가게 영업 상태 변경 API 추가
@Soundbar91
Soundbar91 merged commit 0563688 into feature/2438-owner-order-list-detail Sep 22, 2026
4 checks passed
@Soundbar91
Soundbar91 deleted the feature/2442-owner-order-status-transition branch September 22, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team Business 비즈니스 팀에서 작업할 이슈입니다 기능 새로운 기능을 개발합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant