fix: IoT 卡列表补充 virtual_no 字段和查询过滤,修正设备/卡导入 API 文档描述
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-03-16 10:44:38 +08:00
parent b9c3875c08
commit 275debdd38
54 changed files with 159 additions and 6379 deletions

View File

@@ -88,7 +88,7 @@ func registerDeviceRoutes(router fiber.Router, handler *admin.DeviceHandler, imp
- 文件格式:仅支持 .xlsx (Excel 2007+)
- 必须包含列(首行为表头):
- ` + "`device_no`" + `: 设备号(必填,唯一)
- ` + "`virtual_no`" + `: 设备虚拟号(必填,全局唯一)
- ` + "`device_name`" + `: 设备名称
- ` + "`device_model`" + `: 设备型号
- ` + "`device_type`" + `: 设备类型

View File

@@ -49,9 +49,16 @@ func registerIotCardRoutes(router fiber.Router, handler *admin.IotCardHandler, i
### Excel 文件格式
- 文件格式:仅支持 .xlsx (Excel 2007+)
- 必须包含两列:` + "`ICCID`" + `, ` + "`MSISDN`" + `
- 必列:` + "`ICCID`" + `, ` + "`MSISDN`" + `
- 可选列:` + "`virtual_no`" + `虚拟号表头关键字virtual_no / VirtualNo / 虚拟号 / 设备号)
- 首行为表头(可选,但建议包含)
- 列格式:设置为文本格式(避免长数字被转为科学记数法)`,
- 列格式:设置为文本格式(避免长数字被转为科学记数法)
#### virtual_no 列导入规则(只补空白)
- 该行 virtual_no 非空 + 数据库当前值为 NULL填入新值
- 该行 virtual_no 非空 + 数据库已有值:跳过(不覆盖)
- 批次内有任意 virtual_no 与数据库现存值重复:**整批拒绝**`,
Tags: []string{"IoT卡管理"},
Input: new(dto.ImportIotCardRequest),
Output: new(dto.ImportIotCardResponse),