# Change: 重命名 API 字段 series_allocation_id 为 series_id ## Why 后端 API 字段命名不一致。前端表单使用 `series_id`(套餐系列ID),但 API 参数仍使用 `series_allocation_id`(套餐系列分配ID)。这导致命名混淆且不符合实际业务含义(现在直接指向套餐系列 ID,而非分配记录 ID)。 ## What Changes - **BREAKING**: 重命名 4 个 API 端点的请求/响应字段 - `PATCH /api/admin/iot-cards/series-binding` - 请求参数 `series_allocation_id` → `series_id` - `PATCH /api/admin/devices/series-binding` - 请求参数 `series_allocation_id` → `series_id` - `GET /api/admin/iot-cards/standalone` - 查询参数和响应字段 `series_allocation_id` → `series_id` - `GET /api/admin/devices` - 查询参数和响应字段 `series_allocation_id` → `series_id` - 前端同步修改: - TypeScript 类型定义 - API 方法参数 - 页面组件调用代码 - 移除临时注释 ## Impact - **Affected specs**: iot-card-api, device-api - **Affected code**: - `src/types/api/device.ts` (BatchSetDeviceSeriesBindingRequest) - `src/types/api/card.ts` (BatchSetCardSeriesBindingRequest) - `src/api/modules/device.ts` (batchSetDeviceSeriesBinding) - `src/api/modules/card.ts` (batchSetCardSeriesBinding) - `src/views/asset-management/device-list/index.vue` - `src/views/asset-management/iot-card-management/index.vue` - **Breaking change**: 需要后端先部署更新,前端再部署 - **Migration**: 更新所有使用这些字段的 API 调用