feat: 实现卡和设备的套餐系列绑定功能
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 5m37s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 5m37s
- 添加 Device 和 IotCard 模型的 SeriesID 字段 - 实现 DeviceService 和 IotCardService 的套餐系列绑定逻辑 - 添加 DeviceStore 和 IotCardStore 的数据库操作方法 - 更新 API 接口和路由支持套餐系列绑定 - 创建数据库迁移脚本(000027_add_series_binding_fields) - 添加完整的单元测试和集成测试 - 更新 OpenAPI 文档 - 归档 OpenSpec 变更文档 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -132,4 +132,13 @@ func registerDeviceRoutes(router fiber.Router, handler *admin.DeviceHandler, imp
|
||||
Output: new(dto.DeviceImportTaskDetailResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(devices, doc, groupPath, "PATCH", "/series-binding", handler.BatchSetSeriesBinding, RouteSpec{
|
||||
Summary: "批量设置设备的套餐系列绑定",
|
||||
Description: "批量设置或清除设备与套餐系列分配的关联关系。series_allocation_id 为 0 时表示清除关联。",
|
||||
Tags: []string{"设备管理"},
|
||||
Input: new(dto.BatchSetDeviceSeriesBindngRequest),
|
||||
Output: new(dto.BatchSetDeviceSeriesBindngResponse),
|
||||
Auth: true,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -92,4 +92,13 @@ func registerIotCardRoutes(router fiber.Router, handler *admin.IotCardHandler, i
|
||||
Output: new(dto.RecallStandaloneCardsResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(iotCards, doc, groupPath, "PATCH", "/series-binding", handler.BatchSetSeriesBinding, RouteSpec{
|
||||
Summary: "批量设置卡的套餐系列绑定",
|
||||
Description: "批量设置或清除卡与套餐系列分配的关联关系。series_allocation_id 为 0 时表示清除关联。",
|
||||
Tags: []string{"IoT卡管理"},
|
||||
Input: new(dto.BatchSetCardSeriesBindngRequest),
|
||||
Output: new(dto.BatchSetCardSeriesBindngResponse),
|
||||
Auth: true,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user