62 lines
2.7 KiB
YAML
62 lines
2.7 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
title: 客户来源头程订单尾程进度内部查询
|
|
version: 1.0.0
|
|
paths:
|
|
/internal/lastleg/v1/customer-order-progress:
|
|
post:
|
|
summary: Order按认证客户读取排车和实际派送进度
|
|
description: >-
|
|
只读内部接口,无公网路由。customerId由Order认证上下文提供,所有业务表在Lastleg自身Schema内按客户读取。
|
|
正式排车单PENDING_DEPARTURE/PICKING/READY_TO_DEPART按计划或库存来源计算,预排草稿和取消单不计入。
|
|
派送必须已实际DEPARTED、出库OUTBOUNDED且对应目的地派送单仍WAIT_DELIVERY/DELIVERING。
|
|
混托使用所有库存及不可变拣货来源,不使用代表orderId;数量覆盖不完整或异常时标记partial,不签发派送完成事实。
|
|
security: [{internalServiceToken: []}]
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [customerId]
|
|
properties:
|
|
customerId: {type: integer, format: int64, minimum: 1}
|
|
orderIds:
|
|
type: array
|
|
nullable: true
|
|
minItems: 1
|
|
maxItems: 200
|
|
items: {type: integer, format: int64, minimum: 1}
|
|
description: 省略或null查询当前客户全部进度;传入时仅在SQL内查询这些来源Order订单,空数组拒绝,不允许扩大到全客户。
|
|
responses:
|
|
'200':
|
|
description: ApiResponse,只有code为200表示成功;progress为空表示客户当前无有效排车或派送
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
code: {type: string}
|
|
data:
|
|
type: object
|
|
required: [progress]
|
|
properties:
|
|
progress:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required: [orderId, stage, partial]
|
|
properties:
|
|
orderId: {type: string, pattern: '^[1-9][0-9]*$'}
|
|
stage: {type: string, enum: [scheduled, delivering]}
|
|
partial: {type: boolean}
|
|
'400': {description: 客户参数无效}
|
|
'401': {description: 内部服务令牌缺失或无效}
|
|
'503': {description: 内部令牌未配置}
|
|
components:
|
|
securitySchemes:
|
|
internalServiceToken:
|
|
type: apiKey
|
|
in: header
|
|
name: X-Internal-Service-Token
|