Merge remote-tracking branch 'origin/test' into dev

This commit is contained in:
2026-09-08 17:59:53 +08:00
43 changed files with 867 additions and 73 deletions
@@ -28,6 +28,23 @@ paths:
application/json:
schema: {$ref: '#/components/schemas/CargoLabelBindingListEnvelope'}
'403': {description: 内部服务令牌无效}
/internal/order/v1/cargoes/{tenantId}/{orderId}/printable-inbound-snapshot:
post:
security: []
summary: 为 Firstleg 箱唛打印读取并预留稳定入仓快照
description: >-
仅接受内部服务令牌。若 AUTO 模式草稿尚无入仓码,则按订单渠道原子预留全局唯一入仓码;
并发重放返回已胜出的同一码,后续订单提交继续复用,避免已打印二维码失效。
parameters:
- name: X-Internal-Service-Token
in: header
required: true
schema: {type: string}
- {name: tenantId, in: path, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
- {name: orderId, in: path, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
responses:
'200': {description: 返回带稳定入仓码及总箱数的订单快照}
'403': {description: 内部服务令牌无效}
/internal/order/v1/pending-review-orders:
get:
security: []
@@ -491,6 +508,45 @@ paths:
responses:
'200': {description: 成功或业务失败,按响应体 code 判断}
'403': {description: 需要 platform:order:create 权限}
/api/platform/v1/orders/first-leg/batch-review-preview:
post:
tags: [Platform first-leg orders]
summary: 批量审核预览
description: >-
在一个 HTTP 请求中按目标客户批量返回审核弹窗所需稳定快照。服务端固定使用订单与货物两次批量查询,
中文品名按货物 itemNo 顺序去重;不得由前端逐票请求详情。orderId 仅供路由,主要展示使用 inboundCode;
canApprove=false 时必须展示 blockReason。请求中的 orderVersion 用于识别列表快照是否过期。
parameters:
- $ref: '#/components/parameters/TenantId'
requestBody:
required: true
content:
application/json:
schema: {$ref: '#/components/schemas/BatchReviewRequest'}
responses:
'200':
description: 返回请求顺序一致的批量审核预览
content:
application/json:
schema: {$ref: '#/components/schemas/BatchReviewPreviewEnvelope'}
'403': {description: 需要平台身份和 platform:order:approve 权限}
/api/platform/v1/orders/first-leg/batch-approve:
post:
tags: [Platform first-leg orders]
summary: 批量审核通过订单
description: >-
单客户范围内逐票重新校验权限、状态和 orderVersion,每票独立事务;允许部分成功,
failedOrders 返回未成功订单及业务原因,成功订单不会因其他订单失败而回滚。
parameters:
- $ref: '#/components/parameters/TenantId'
requestBody:
required: true
content:
application/json:
schema: {$ref: '#/components/schemas/BatchReviewRequest'}
responses:
'200': {description: 返回部分成功语义的逐票处理汇总}
'403': {description: 需要平台身份和 platform:order:approve 权限}
/api/platform/v1/orders/first-leg/tenant-statistics:
get:
tags: [Platform first-leg orders]
@@ -635,6 +691,54 @@ components:
widthCm: {type: number, nullable: true}
heightCm: {type: number, nullable: true}
shipmentId: {type: string, nullable: true, description: 当前货物行的 FBA 货件号快照,不以订单级字段回退}
BatchReviewRequest:
type: object
required: [items]
properties:
items:
type: array
minItems: 1
maxItems: 100
uniqueItems: true
items: {$ref: '#/components/schemas/BatchReviewRequestItem'}
BatchReviewRequestItem:
type: object
required: [orderId, orderVersion]
properties:
orderId: {type: string, pattern: '^[1-9][0-9]*$', description: 仅供路由关联,不作为主要展示键}
orderVersion: {type: integer, minimum: 0, description: 统一订单列表返回的 Order 乐观锁版本}
BatchReviewPreviewEnvelope:
type: object
required: [code, data]
properties:
code: {type: string, example: "200"}
message: {type: string, nullable: true}
data: {$ref: '#/components/schemas/BatchReviewPreview'}
BatchReviewPreview:
type: object
required: [total, approvableCount, items]
properties:
total: {type: integer, minimum: 1, maximum: 100}
approvableCount: {type: integer, minimum: 0, maximum: 100}
items:
type: array
items: {$ref: '#/components/schemas/BatchReviewPreviewItem'}
BatchReviewPreviewItem:
type: object
required: [orderId, orderVersion, chineseGoodsNames, canApprove]
properties:
orderId: {type: string, pattern: '^[1-9][0-9]*$', description: 仅供路由关联,不作为主要展示键}
orderVersion: {type: integer, minimum: 0}
inboundCode: {type: string, nullable: true, description: 权威入仓码;缺失时为 null,不以内部 ID 回退}
customerId: {type: string, nullable: true, pattern: '^[1-9][0-9]*$'}
customerName: {type: string, nullable: true}
chineseGoodsNames: {type: array, items: {type: string}, description: 按订单货物顺序去重的中文品名}
channelCode: {type: string, nullable: true}
channelName: {type: string, nullable: true}
destinationWarehouseCode: {type: string, nullable: true, description: Order 保存的目的仓业务编码;缺失时不以内部 ID 回退}
destinationWarehouseName: {type: string, nullable: true}
canApprove: {type: boolean}
blockReason: {type: string, nullable: true}
DomesticWarehouseOrderExportBatchRequest:
type: object
required: [taskId, tenantId, appCode, requestedBy, dispatchVersion, parameters, limit]