七月迭代短暂完结,还有很多后端的关键东西没有弄,这是一版赶时间做的东西
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s

This commit is contained in:
2026-07-25 17:06:58 +08:00
parent ad9f613dd6
commit 73f5125d3d
249 changed files with 17137 additions and 877 deletions

View File

@@ -21,6 +21,15 @@ func registerDeviceRoutes(router fiber.Router, handler *admin.DeviceHandler, imp
Auth: true,
})
Register(devices, doc, groupPath, "POST", "/batch-update-realname-policy", handler.BatchUpdateRealnamePolicy, RouteSpec{
Summary: "批量更新设备实名认证策略",
Description: "单次最多500条先校验整批资产及数据权限再在单事务内全成全败更新。设备下卡存在策略冲突时C端以设备策略为准。",
Tags: []string{"设备管理"},
Input: new(dto.BatchUpdateAssetRealnamePolicyRequest),
Output: new(dto.BatchUpdateAssetRealnamePolicyResponse),
Auth: true,
})
Register(devices, doc, groupPath, "DELETE", "/:virtual_no", handler.Delete, RouteSpec{
Summary: "删除设备",
Description: "仅平台用户可操作。删除设备时自动解绑所有卡(卡不会被删除)。",
@@ -115,6 +124,15 @@ func registerDeviceRoutes(router fiber.Router, handler *admin.DeviceHandler, imp
Auth: true,
})
Register(devices, doc, groupPath, "POST", "/import/allocations", importHandler.CreateAllocation, RouteSpec{
Summary: "创建CSV设备批量分配任务",
Description: "复用设备导入任务。CSV只能包含一列设备标识每行支持VirtualNo、IMEI或SN整批选择分配目标代理或设置目标套餐系列。",
Tags: []string{"设备管理"},
Input: new(dto.CreateDeviceBatchAllocationRequest),
Output: new(dto.CreateDeviceBatchAllocationResponse),
Auth: true,
})
Register(devices, doc, groupPath, "GET", "/import/tasks/:id", importHandler.GetByID, RouteSpec{
Summary: "导入任务详情",
Description: "仅平台用户可操作。包含跳过和失败记录的详细信息。",
@@ -142,15 +160,6 @@ func registerDeviceRoutes(router fiber.Router, handler *admin.DeviceHandler, imp
Auth: true,
})
Register(devices, doc, groupPath, "PUT", "/by-identifier/:identifier/speed-limit", handler.SetSpeedLimit, RouteSpec{
Summary: "设置限速",
Description: "通过虚拟号/IMEI/SN 设置设备限速。设备必须已配置 IMEI。",
Tags: []string{"设备管理"},
Input: new(dto.SetSpeedLimitRequest),
Output: new(dto.EmptyResponse),
Auth: true,
})
Register(devices, doc, groupPath, "PUT", "/by-identifier/:identifier/wifi", handler.SetWiFi, RouteSpec{
Summary: "设置 WiFi",
Description: "通过虚拟号/IMEI/SN 设置设备 WiFi。设备必须已配置 IMEI。",