fix(order): paginate merchant workbench with scoped queue counts

This commit is contained in:
2026-10-03 14:57:51 +08:00
parent 7d9ee18196
commit 780d37e1d2
22 changed files with 705 additions and 6 deletions
+44 -1
View File
@@ -6,6 +6,49 @@ info:
security:
- bearerAuth: []
paths:
/api/merchant/v1/orders/workbench:
get:
summary: 客户订单工作台分页和筛选后待办数量
description: >-
仅按登录客户查询,权限merchant:order:list。草稿优先,再按创建时间和订单ID降序稳定分页。
入仓码/SKU采用或匹配;所有条件先筛选再计数。四类数量共用当前筛选,不从当前页行数计算。
默认包含草稿和有效正式单;履约子状态以Firstleg为准,待审核和已完成以Order为准。
security: [{bearerAuth: []}]
parameters:
- {name: cargoKeyword, in: query, schema: {type: string, maxLength: 64}}
- {name: receivingWarehouseId, in: query, schema: {type: integer, format: int64}}
- {name: channelName, in: query, schema: {type: string, maxLength: 128}}
- {name: destinationType, in: query, schema: {type: string, enum: [FBA, OVERSEAS, PRIVATE]}}
- {name: trackingNumber, in: query, schema: {type: string, maxLength: 128}}
- {name: mainStatus, in: query, schema: {type: string, enum: [DRAFT, PENDING_REVIEW, WAIT_MEASURE, WAIT_PALLETIZE, WAIT_SPLIT, LOADING, LOADED, DELIVERED, COMPLETED, CANCELLED]}}
- {name: createdFrom, in: query, schema: {type: string, format: date-time}}
- {name: createdTo, in: query, schema: {type: string, format: date-time}}
- {name: queue, in: query, schema: {type: string, enum: [all, fee, customs, draft], default: all}}
- {name: page, in: query, schema: {type: integer, minimum: 1, default: 1}}
- {name: size, in: query, schema: {type: integer, minimum: 1, maximum: 200, default: 10}}
responses:
'200':
description: 成功或业务错误;后端依赖不可用时返回明确错误,不返回局部成功数据
content:
application/json:
schema:
type: object
properties:
code: {type: string}
data:
type: object
required: [page, queues, channelNames]
properties:
page: {$ref: '#/components/schemas/UnifiedOrderPage'}
queues:
type: object
required: [all, fee, customs, draft]
properties:
all: {type: integer, format: int64, minimum: 0}
fee: {type: integer, format: int64, minimum: 0}
customs: {type: integer, format: int64, minimum: 0}
draft: {type: integer, format: int64, minimum: 0}
channelNames: {type: array, items: {type: string}, description: 当前客户完整渠道筛选项,不限于当前页}
/internal/order/v1/fulfillment-completions:
post:
security: []
@@ -1041,7 +1084,7 @@ components:
asOf: {type: string, format: date-time}
UnifiedMainStatus:
type: string
enum: [PENDING_REVIEW, WAIT_MEASURE, WAIT_PALLETIZE, INBOUNDED, WAIT_SPLIT, LOADING, LOADED, DELIVERED, COMPLETED]
enum: [DRAFT, PENDING_REVIEW, WAIT_MEASURE, WAIT_PALLETIZE, INBOUNDED, WAIT_SPLIT, LOADING, LOADED, DELIVERED, COMPLETED, CANCELLED]
description: >-
统一订单八态产品主状态。ONE_CLICK_DROPSHIP 测量计费完成后进入 WAIT_PALLETIZE,封托完成后进入 WAIT_SPLIT;
STANDARD 保持既有流程,INBOUNDED 仅兼容存量已入库记录。