Skip to content

[BE2-E] 주문 관리자 화면 (목록/상태 전이) #24

Description

@yesung05

작업 내용

docs/백엔드_기능명세.md Module E 섹션 참고. 매장 운영에 가장 직접적으로 쓰이는 화면.

신규 파일: backend/api/admin/orders.py. backend/dao/order_dao.py
list_orders, update_order_status 추가.

API

Method Path 응답
GET /api/admin/orders (쿼리: status, order_type) list[OrderAdminOut]
GET /api/admin/orders/{id} OrderAdminOut
PATCH /api/admin/orders/{id}/status OrderAdminOut

MVP 범위: 폴링으로 충분, WebSocket/SSE는 이번 범위 제외.

상태 전이 검증 (라우터 레이어에서만, DAO에는 규칙을 넣지 않음)

RECEIVED → COOKING → READY → COMPLETED 앞으로만 전이 가능(중간 단계 건너뛰기는 허용, 역행은
400). CANCELLEDCOMPLETED가 아닌 모든 상태에서 가능. 이 검증은 PATCH .../status 엔드포인트
전용이며, 환불(#다른 이슈, Module D)은 이 검증을 거치지 않고 update_order_status를 직접 호출해
COMPLETED에서도 CANCELLED로 전이한다 — 완료 후 환불도 가능해야 하므로 의도적으로 별도 경로.

완료 기준

  • 새 주문 결제 완료 시 관리자 목록에 RECEIVED 상태로 즉시 조회됨
  • 상태 전이가 앞으로만 가능(역행 400), 중간 단계 스킵은 허용
  • CANCELLEDCOMPLETED가 아닌 모든 상태에서 전이 가능

참고

docs/백엔드_기능명세.md Module E. 선행 조건: #20(orders.status), #22(관리자 인증).

Metadata

Metadata

Assignees

Labels

admin관리자 화면/API 관련 작업phase2Phase 2: 백엔드 로직 보완 + 관리자 화면routerFastAPI 라우터

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions