feat(selfop): sync versioned owner and product directories

This commit is contained in:
2026-10-14 16:15:39 +08:00
parent 2b3b13913b
commit d311d9dc8d
47 changed files with 803 additions and 66 deletions
@@ -132,7 +132,7 @@ components:
exclusiveGrantId: { type: string, maxLength: 128 }
Operation:
type: string
enum: [WAREHOUSES, OUTBOUND_QUERY, OUTBOUND_LOCATE, OUTBOUND_DETAIL, PRODUCT_INVENTORY]
enum: [WAREHOUSES, OUTBOUND_QUERY, OUTBOUND_LOCATE, OUTBOUND_DETAIL, PRODUCT_INVENTORY, CUSTOMERS, PRODUCTS]
AuthorizationRequest:
type: object
required: [context, operation, requestHash]
@@ -21,6 +21,31 @@ info:
重试沿既有POST sync-tasks,action=RETRY/requestKey/warehouseCode/taskNo/reason,使用独立sync权限并最终复核资格。
security: [{bearerAuth: []}]
paths:
/api/platform/v1/last-leg/self-operated-analytics/owner-directory:
get:
summary: 完整资料批次中的客户名称与编码
description: 仅平台且须 platform:self-operated-analytics:list。按账号和 queryAsOf 选择最近完整发布的 MASTER_DATA 资料版本;不调用领星,不限制为当前仓有销量的客户。未同步返回空数组,缺失名称返回 null。
parameters:
- {$ref: '#/components/parameters/sourceAccount'}
- {$ref: '#/components/parameters/warehouseCode'}
- {$ref: '#/components/parameters/salesRunId'}
- {$ref: '#/components/parameters/inventoryRunId'}
- {$ref: '#/components/parameters/salesScopeHash'}
- {$ref: '#/components/parameters/inventoryScopeHash'}
- {$ref: '#/components/parameters/queryAsOf'}
responses:
'200':
description: 统一 ApiResponse
content:
application/json:
schema:
type: object
properties:
code: {type: string}
message: {type: string}
data: {type: array, items: {$ref: '#/components/schemas/OwnerOption'}}
'401': {description: 缺少可信认证身份}
'403': {description: 非平台身份或缺少只读权限}
/api/platform/v1/last-leg/self-operated-analytics/dashboard:
get:
summary: 单仓固定版本经营总览
@@ -482,6 +507,7 @@ components:
DashboardRankingItem:
type: object
properties:
customerName: {type: string, nullable: true, description: queryAsOf 时可见的完整资料批次中的货主名称}
customerCode: {type: string}
sku: {type: string}
productName: {type: string, nullable: true}
@@ -603,6 +629,7 @@ components:
SalesSummary:
type: object
properties:
customerName: {type: string, nullable: true, description: queryAsOf 时可见的完整资料批次中的货主名称}
sourceAccount: {type: string, nullable: true}
warehouseCode: {type: string, nullable: true}
customerCode: {type: string, nullable: true}
@@ -721,7 +748,7 @@ components:
taskNo: {type: string, nullable: true}
attemptNo: {type: integer, nullable: true}
status: {type: string, nullable: true}
phase: {type: string, nullable: true}
phase: {type: string, nullable: true, description: 资料同步使用 CUSTOMERS / PRODUCTS;其他阶段不变}
executionPurpose: {type: string, nullable: true}
startedAt: {type: string, format: date-time, nullable: true}
finishedAt: {type: string, format: date-time, nullable: true}
@@ -745,7 +772,7 @@ components:
elapsedSeconds: {type: string, nullable: true, description: 自创建起的累计秒数,含排队和重试;活动任务截止本次读取,终态任务截止任务最后更新时间;不是单次执行耗时}
taskNo: {type: string, nullable: true}
taskType: {type: string, nullable: true}
dataFamily: {type: string, nullable: true}
dataFamily: {type: string, nullable: true, description: OUTBOUND / INVENTORY / MASTER_DATA(账号资料)}
warehouseCode: {type: string, nullable: true}
taskRole: {type: string, nullable: true}
executionPurpose: {type: string, nullable: true}
@@ -814,7 +841,7 @@ components:
properties:
warehouseCode: {type: string, nullable: true}
warehouseName: {type: string, nullable: true}
dataFamily: {type: string, nullable: true}
dataFamily: {type: string, nullable: true, description: OUTBOUND / INVENTORY / MASTER_DATA(账号资料)}
executionEnabled: {type: boolean, nullable: true}
publicationEnabled: {type: boolean, nullable: true}
disabledReason: {type: string, nullable: true}
@@ -861,7 +888,7 @@ components:
countBasis: {type: string, nullable: true}
attemptNo: {type: string, nullable: true}
scanRound: {type: string, nullable: true}
phase: {type: string, nullable: true}
phase: {type: string, nullable: true, description: 资料同步使用 CUSTOMERS / PRODUCTS;其他阶段不变}
completed: {type: string, nullable: true}
total: {type: string, nullable: true}
totalKnown: {type: boolean, nullable: true}