优化
This commit is contained in:
@@ -8,8 +8,8 @@ security:
|
||||
paths:
|
||||
/internal/firstleg/v1/customer-dimension-configs/defaults:
|
||||
post:
|
||||
summary: 幂等初始化客户尺寸计算默认配置
|
||||
description: 仅供 IAM 在客户创建或注册成功编排中调用;同一客户和 initializationKey 重试稳定返回 createdByThisInitialization=true。
|
||||
summary: 幂等初始化客户四箱规默认配置
|
||||
description: 原子创建 SMALL、MEDIUM、LARGE、EXTRA_LARGE 四行;同一客户和 initializationKey 重试稳定返回 createdByThisInitialization=true,configId 为 SMALL 行 ID。
|
||||
security:
|
||||
- internalServiceToken: []
|
||||
requestBody:
|
||||
@@ -20,8 +20,8 @@ paths:
|
||||
responses:
|
||||
'200': {description: 成功或业务失败,data 返回 configId 和 createdByThisInitialization}
|
||||
delete:
|
||||
summary: 补偿删除本次新建且尚未修改的默认配置
|
||||
description: 仅供 IAM 创建客户事务补偿使用;同时匹配 initializationKey、默认2cm和version=0才物理删除。
|
||||
summary: 补偿删除本次新建且尚未修改的四箱规默认配置
|
||||
description: 仅当四行均匹配 initializationKey、默认尺寸、默认2cm和version=0时整组物理删除,不会部分删除。
|
||||
security:
|
||||
- internalServiceToken: []
|
||||
parameters:
|
||||
@@ -31,16 +31,16 @@ paths:
|
||||
'200': {description: 幂等补偿完成}
|
||||
/api/platform/v1/first-leg/customer-dimension-config:
|
||||
get:
|
||||
summary: 查询客户尺寸计算配置
|
||||
description: 需要 firstleg:dimension-config:view 权限;配置只描述真实尺寸的每侧加宽值,当前不参与订单或计费。
|
||||
summary: 查询客户固定四箱规尺寸配置
|
||||
description: 需要 firstleg:dimension-config:view 权限;按 SMALL、MEDIUM、LARGE、EXTRA_LARGE 固定顺序返回,当前不参与订单或计费。
|
||||
parameters:
|
||||
- {name: tenantId, in: query, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
|
||||
responses:
|
||||
'200': {description: 成功时 data 为 CustomerDimensionConfigResponse}
|
||||
'200': {description: 成功时 data 为 CustomerDimensionConfigGroupResponse}
|
||||
'403': {description: 无查询权限}
|
||||
put:
|
||||
summary: 编辑客户尺寸计算配置
|
||||
description: 需要 firstleg:dimension-config:edit 权限;使用 version 执行乐观锁更新。
|
||||
summary: 整组编辑客户固定四箱规尺寸配置
|
||||
description: 需要 firstleg:dimension-config:edit 权限;请求必须恰好包含四种固定 boxType,四行逐行乐观锁并在同一事务原子保存。
|
||||
parameters:
|
||||
- {name: tenantId, in: query, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
|
||||
requestBody:
|
||||
@@ -49,7 +49,7 @@ paths:
|
||||
application/json:
|
||||
schema: {$ref: '#/components/schemas/CustomerDimensionConfigUpdateRequest'}
|
||||
responses:
|
||||
'200': {description: 成功时 data 为更新后的 CustomerDimensionConfigResponse}
|
||||
'200': {description: 成功时 data 为更新后的 CustomerDimensionConfigGroupResponse}
|
||||
'403': {description: 无编辑权限}
|
||||
/internal/firstleg/v1/inbounds/order-approved:
|
||||
post:
|
||||
@@ -288,6 +288,20 @@ paths:
|
||||
responses:
|
||||
'200': {description: 成功或业务失败,按响应体 code 判断}
|
||||
'403': {description: 无确认权限,或修改重量时无编辑权限}
|
||||
/api/platform/v1/first-leg/inbounds/{inboundId}/weight-results/{resultId}:
|
||||
delete:
|
||||
summary: 删除称重图片及重量结果
|
||||
description: >-
|
||||
需要 platform:firstleg:inbound:weight:edit 权限;仅允许在可编辑的测量状态删除。
|
||||
删除已确认图片后重新汇总剩余已确认图片的实际总毛重,删除最后一张时总毛重恢复为空。
|
||||
parameters:
|
||||
- {name: tenantId, in: query, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
|
||||
- {name: version, in: query, required: true, schema: {type: integer, format: int32, minimum: 0}}
|
||||
- {name: inboundId, in: path, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
|
||||
- {name: resultId, in: path, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
|
||||
responses:
|
||||
'200': {description: 成功或业务失败,按响应体 code 判断}
|
||||
'403': {description: 无重量编辑权限}
|
||||
/api/platform/v1/inbounds/{inboundId}/measurements/approve:
|
||||
post:
|
||||
summary: 审核通过测量
|
||||
@@ -405,24 +419,56 @@ components:
|
||||
schemas:
|
||||
CustomerDimensionConfigUpdateRequest:
|
||||
type: object
|
||||
required: [edgeAdditionCm, version]
|
||||
required: [rules]
|
||||
properties:
|
||||
rules:
|
||||
type: array
|
||||
minItems: 4
|
||||
maxItems: 4
|
||||
description: 必须恰好包含 SMALL、MEDIUM、LARGE、EXTRA_LARGE 各一行
|
||||
items: {$ref: '#/components/schemas/CustomerDimensionConfigRuleUpdateRequest'}
|
||||
CustomerDimensionConfigRuleUpdateRequest:
|
||||
type: object
|
||||
required: [boxType, innerLengthCm, innerWidthCm, innerHeightCm, edgeAdditionCm, version]
|
||||
properties:
|
||||
boxType: {type: string, enum: [SMALL, MEDIUM, LARGE, EXTRA_LARGE]}
|
||||
innerLengthCm: {type: number, minimum: 0.001, multipleOf: 0.001}
|
||||
innerWidthCm: {type: number, minimum: 0.001, multipleOf: 0.001}
|
||||
innerHeightCm: {type: number, minimum: 0.001, multipleOf: 0.001}
|
||||
edgeAdditionCm:
|
||||
type: number
|
||||
minimum: 0.001
|
||||
maximum: 100
|
||||
multipleOf: 0.001
|
||||
description: 真实长、宽、高三个方向分别使用的每侧加宽厘米数
|
||||
description: 箱规长、宽、高三个方向分别使用的每侧加宽厘米数
|
||||
example: 2.000
|
||||
remark: {type: string, maxLength: 500, nullable: true}
|
||||
version: {type: integer, minimum: 0, description: 乐观锁版本号}
|
||||
CustomerDimensionConfigResponse:
|
||||
CustomerDimensionConfigGroupResponse:
|
||||
type: object
|
||||
required: [id, tenantId, edgeAdditionCm, version]
|
||||
required: [tenantId, rules]
|
||||
properties:
|
||||
tenantId: {type: string, pattern: '^[1-9][0-9]*$'}
|
||||
rules:
|
||||
type: array
|
||||
minItems: 4
|
||||
maxItems: 4
|
||||
items: {$ref: '#/components/schemas/CustomerDimensionConfigRuleResponse'}
|
||||
CustomerDimensionConfigRuleResponse:
|
||||
type: object
|
||||
required: [id, boxType, boxTypeName, innerLengthCm, innerWidthCm, innerHeightCm, edgeAdditionCm, outerLengthCm, outerWidthCm, outerHeightCm, volumeCbm, version]
|
||||
properties:
|
||||
id: {type: string, pattern: '^[1-9][0-9]*$'}
|
||||
tenantId: {type: string, pattern: '^[1-9][0-9]*$'}
|
||||
boxType: {type: string, enum: [SMALL, MEDIUM, LARGE, EXTRA_LARGE]}
|
||||
boxTypeName: {type: string, enum: [小箱, 中箱, 大箱, 特大箱]}
|
||||
innerLengthCm: {type: number, minimum: 0.001, multipleOf: 0.001}
|
||||
innerWidthCm: {type: number, minimum: 0.001, multipleOf: 0.001}
|
||||
innerHeightCm: {type: number, minimum: 0.001, multipleOf: 0.001}
|
||||
edgeAdditionCm: {type: number, minimum: 0.001, maximum: 100, example: 2.000}
|
||||
outerLengthCm: {type: number, minimum: 0.001, description: innerLengthCm + edgeAdditionCm * 2}
|
||||
outerWidthCm: {type: number, minimum: 0.001, description: innerWidthCm + edgeAdditionCm * 2}
|
||||
outerHeightCm: {type: number, minimum: 0.001, description: innerHeightCm + edgeAdditionCm * 2}
|
||||
volumeCbm: {type: number, multipleOf: 0.001, description: 使用未舍入外径完整计算后四舍五入保留3位}
|
||||
remark: {type: string, nullable: true}
|
||||
version: {type: integer, minimum: 0}
|
||||
createdAt: {type: string, format: date-time, nullable: true}
|
||||
|
||||
Reference in New Issue
Block a user