重构: 将卡/设备的套餐系列绑定从分配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:
@@ -137,7 +137,7 @@ func registerDeviceRoutes(router fiber.Router, handler *admin.DeviceHandler, imp
|
||||
|
||||
Register(devices, doc, groupPath, "PATCH", "/series-binding", handler.BatchSetSeriesBinding, RouteSpec{
|
||||
Summary: "批量设置设备的套餐系列绑定",
|
||||
Description: "批量设置或清除设备与套餐系列分配的关联关系。series_allocation_id 为 0 时表示清除关联。",
|
||||
Description: "批量设置或清除设备与套餐系列分配的关联关系。参数:series_id(套餐系列ID,0表示清除关联)。",
|
||||
Tags: []string{"设备管理"},
|
||||
Input: new(dto.BatchSetDeviceSeriesBindngRequest),
|
||||
Output: new(dto.BatchSetDeviceSeriesBindngResponse),
|
||||
|
||||
@@ -101,7 +101,7 @@ func registerIotCardRoutes(router fiber.Router, handler *admin.IotCardHandler, i
|
||||
|
||||
Register(iotCards, doc, groupPath, "PATCH", "/series-binding", handler.BatchSetSeriesBinding, RouteSpec{
|
||||
Summary: "批量设置卡的套餐系列绑定",
|
||||
Description: "批量设置或清除卡与套餐系列分配的关联关系。series_allocation_id 为 0 时表示清除关联。",
|
||||
Description: "批量设置或清除卡与套餐系列分配的关联关系。参数:series_id(套餐系列ID,0表示清除关联)。",
|
||||
Tags: []string{"IoT卡管理"},
|
||||
Input: new(dto.BatchSetCardSeriesBindngRequest),
|
||||
Output: new(dto.BatchSetCardSeriesBindngResponse),
|
||||
|
||||
Reference in New Issue
Block a user