-`baiyue_order`:订单主数据、货物、收发货快照、目的仓快照、内部备注、状态历史和事务发件箱。 / Order master data, cargo, sender/receiver and destination snapshots, internal notes, status history, and transactional outbox.
-`baiyue_firstleg`:头程履约任务、指派历史与事件消费幂等。 / First-leg fulfillment tasks, assignment history, and event-consumer idempotency.
- 两个服务仅通过 `tenant_id + order_id + order_no` 逻辑关联,不建立跨库外键。 / Services use logical `tenant_id + order_id + order_no` references and never create cross-database foreign keys.
Merchant APIs require `appCode=MERCHANT` and derive the customer scope from the JWT compatibility field. The platform list requires `appCode=PLATFORM`: omitting `tenantId` queries all customers, while supplying it filters one customer. Platform detail and write operations still require an explicit `tenantId` representing the target customer.
The main flow is `DRAFT → SUBMITTED → APPROVED → ACCEPTED → PROCESSING → COMPLETED`; rejection follows `SUBMITTED → REJECTED → DRAFT`, and cancellation is permitted before processing. Status changes append to `ord_order_status_history`; key operations use `@BusinessAudit`.