重构: 将卡/设备的套餐系列绑定从分配ID改为系列ID
- 数据库: 重命名 series_allocation_id → series_id - Model: IotCard 和 Device 字段重命名 - DTO: 所有请求/响应字段统一为 series_id - Store: 方法重命名,新增 GetByShopAndSeries 查询 - Service: 业务逻辑优化,系列验证和权限验证分离 - 测试: 更新所有测试用例,新增 shop_series_allocation_store_test.go - 文档: 更新 API 文档说明参数变更 BREAKING CHANGE: API 参数从 series_allocation_id 改为 series_id
This commit is contained in:
@@ -630,13 +630,13 @@ components:
|
||||
minItems: 1
|
||||
nullable: true
|
||||
type: array
|
||||
series_allocation_id:
|
||||
description: 套餐系列分配ID(0表示清除关联)
|
||||
series_id:
|
||||
description: 套餐系列ID(0表示清除关联)
|
||||
minimum: 0
|
||||
type: integer
|
||||
required:
|
||||
- iccids
|
||||
- series_allocation_id
|
||||
- series_id
|
||||
type: object
|
||||
DtoBatchSetCardSeriesBindngResponse:
|
||||
properties:
|
||||
@@ -664,13 +664,13 @@ components:
|
||||
minItems: 1
|
||||
nullable: true
|
||||
type: array
|
||||
series_allocation_id:
|
||||
description: 套餐系列分配ID(0表示清除关联)
|
||||
series_id:
|
||||
description: 套餐系列ID(0表示清除关联)
|
||||
minimum: 0
|
||||
type: integer
|
||||
required:
|
||||
- device_ids
|
||||
- series_allocation_id
|
||||
- series_id
|
||||
type: object
|
||||
DtoBatchSetDeviceSeriesBindngResponse:
|
||||
properties:
|
||||
@@ -1090,9 +1090,13 @@ components:
|
||||
minItems: 1
|
||||
nullable: true
|
||||
type: array
|
||||
payment_method:
|
||||
description: 支付方式 (wallet:钱包支付, offline:线下支付)
|
||||
type: string
|
||||
required:
|
||||
- order_type
|
||||
- package_ids
|
||||
- payment_method
|
||||
type: object
|
||||
DtoCreatePackageRequest:
|
||||
properties:
|
||||
@@ -1367,9 +1371,21 @@ components:
|
||||
properties:
|
||||
base_commission:
|
||||
$ref: '#/components/schemas/DtoBaseCommissionConfig'
|
||||
enable_force_recharge:
|
||||
description: 是否启用强充(累计充值强充)
|
||||
nullable: true
|
||||
type: boolean
|
||||
enable_one_time_commission:
|
||||
description: 是否启用一次性佣金
|
||||
type: boolean
|
||||
force_recharge_amount:
|
||||
description: 强充金额(分,0表示使用阈值金额)
|
||||
nullable: true
|
||||
type: integer
|
||||
force_recharge_trigger_type:
|
||||
description: 强充触发类型(1:单次充值, 2:累计充值)
|
||||
nullable: true
|
||||
type: integer
|
||||
one_time_commission_config:
|
||||
$ref: '#/components/schemas/DtoOneTimeCommissionConfig'
|
||||
series_id:
|
||||
@@ -1731,8 +1747,8 @@ components:
|
||||
max_sim_slots:
|
||||
description: 最大插槽数
|
||||
type: integer
|
||||
series_allocation_id:
|
||||
description: 套餐系列分配ID
|
||||
series_id:
|
||||
description: 套餐系列ID
|
||||
minimum: 0
|
||||
nullable: true
|
||||
type: integer
|
||||
@@ -2301,8 +2317,8 @@ components:
|
||||
real_name_status:
|
||||
description: 实名状态 (0:未实名, 1:已实名)
|
||||
type: integer
|
||||
series_allocation_id:
|
||||
description: 套餐系列分配ID
|
||||
series_id:
|
||||
description: 套餐系列ID
|
||||
minimum: 0
|
||||
nullable: true
|
||||
type: integer
|
||||
@@ -2707,6 +2723,9 @@ components:
|
||||
minimum: 0
|
||||
nullable: true
|
||||
type: integer
|
||||
is_purchase_on_behalf:
|
||||
description: 是否为代购订单
|
||||
type: boolean
|
||||
items:
|
||||
description: 订单明细列表
|
||||
items:
|
||||
@@ -3754,9 +3773,18 @@ components:
|
||||
created_at:
|
||||
description: 创建时间
|
||||
type: string
|
||||
enable_force_recharge:
|
||||
description: 是否启用强充
|
||||
type: boolean
|
||||
enable_one_time_commission:
|
||||
description: 是否启用一次性佣金
|
||||
type: boolean
|
||||
force_recharge_amount:
|
||||
description: 强充金额(分)
|
||||
type: integer
|
||||
force_recharge_trigger_type:
|
||||
description: 强充触发类型(1:单次充值, 2:累计充值)
|
||||
type: integer
|
||||
id:
|
||||
description: 分配ID
|
||||
minimum: 0
|
||||
@@ -3952,8 +3980,8 @@ components:
|
||||
real_name_status:
|
||||
description: 实名状态 (0:未实名, 1:已实名)
|
||||
type: integer
|
||||
series_allocation_id:
|
||||
description: 套餐系列分配ID
|
||||
series_id:
|
||||
description: 套餐系列ID
|
||||
minimum: 0
|
||||
nullable: true
|
||||
type: integer
|
||||
@@ -4405,10 +4433,22 @@ components:
|
||||
properties:
|
||||
base_commission:
|
||||
$ref: '#/components/schemas/DtoBaseCommissionConfig'
|
||||
enable_force_recharge:
|
||||
description: 是否启用强充(累计充值强充)
|
||||
nullable: true
|
||||
type: boolean
|
||||
enable_one_time_commission:
|
||||
description: 是否启用一次性佣金
|
||||
nullable: true
|
||||
type: boolean
|
||||
force_recharge_amount:
|
||||
description: 强充金额(分,0表示使用阈值金额)
|
||||
nullable: true
|
||||
type: integer
|
||||
force_recharge_trigger_type:
|
||||
description: 强充触发类型(1:单次充值, 2:累计充值)
|
||||
nullable: true
|
||||
type: integer
|
||||
one_time_commission_config:
|
||||
$ref: '#/components/schemas/DtoOneTimeCommissionConfig'
|
||||
type: object
|
||||
@@ -6957,11 +6997,11 @@ paths:
|
||||
minimum: 0
|
||||
nullable: true
|
||||
type: integer
|
||||
- description: 套餐系列分配ID
|
||||
- description: 套餐系列ID
|
||||
in: query
|
||||
name: series_allocation_id
|
||||
name: series_id
|
||||
schema:
|
||||
description: 套餐系列分配ID
|
||||
description: 套餐系列ID
|
||||
minimum: 0
|
||||
nullable: true
|
||||
type: integer
|
||||
@@ -7836,7 +7876,7 @@ paths:
|
||||
- 设备管理
|
||||
/api/admin/devices/series-binding:
|
||||
patch:
|
||||
description: 批量设置或清除设备与套餐系列分配的关联关系。series_allocation_id 为 0 时表示清除关联。
|
||||
description: 批量设置或清除设备与套餐系列分配的关联关系。参数:series_id(套餐系列ID,0表示清除关联)。
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
@@ -8880,6 +8920,8 @@ paths:
|
||||
/api/admin/iot-cards/import:
|
||||
post:
|
||||
description: |-
|
||||
仅平台用户可操作。
|
||||
|
||||
## ⚠️ 接口变更说明(BREAKING CHANGE)
|
||||
|
||||
本接口已从 `multipart/form-data` 改为 `application/json`。
|
||||
@@ -8970,6 +9012,7 @@ paths:
|
||||
- IoT卡管理
|
||||
/api/admin/iot-cards/import-tasks:
|
||||
get:
|
||||
description: 仅平台用户可操作。
|
||||
parameters:
|
||||
- description: 页码
|
||||
in: query
|
||||
@@ -9084,6 +9127,7 @@ paths:
|
||||
- IoT卡管理
|
||||
/api/admin/iot-cards/import-tasks/{id}:
|
||||
get:
|
||||
description: 仅平台用户可操作。
|
||||
parameters:
|
||||
- description: 任务ID
|
||||
in: path
|
||||
@@ -9151,7 +9195,7 @@ paths:
|
||||
- IoT卡管理
|
||||
/api/admin/iot-cards/series-binding:
|
||||
patch:
|
||||
description: 批量设置或清除卡与套餐系列分配的关联关系。series_allocation_id 为 0 时表示清除关联。
|
||||
description: 批量设置或清除卡与套餐系列分配的关联关系。参数:series_id(套餐系列ID,0表示清除关联)。
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
@@ -9256,11 +9300,11 @@ paths:
|
||||
minimum: 0
|
||||
nullable: true
|
||||
type: integer
|
||||
- description: 套餐系列分配ID
|
||||
- description: 套餐系列ID
|
||||
in: query
|
||||
name: series_allocation_id
|
||||
name: series_id
|
||||
schema:
|
||||
description: 套餐系列分配ID
|
||||
description: 套餐系列ID
|
||||
minimum: 0
|
||||
nullable: true
|
||||
type: integer
|
||||
|
||||
Reference in New Issue
Block a user