## 1. 权限校验收敛(IoT 卡导入任务) - [x] 1.1 在 `internal/handler/admin/iot_card_import.go` 的 `Import`/`List`/`GetByID` 增加用户类型校验:仅 `UserTypeSuperAdmin`/`UserTypePlatform` 允许访问,其余返回 `CodeForbidden` - [x] 1.2 校验错误消息文案与设备导入保持同风格(中文、明确动作),并确认不会泄露底层错误细节 ## 2. 路由描述与文档一致性 - [x] 2.1 在 `internal/routes/iot_card.go` 为 `POST /iot-cards/import`、`GET /iot-cards/import-tasks`、`GET /iot-cards/import-tasks/:id` 补充 `Description: "仅平台用户可操作。"` ## 3. 测试补齐 - [x] 3.1 在集成测试中新增用例:非平台用户(至少覆盖代理账号)访问上述 3 个接口应返回 403(Forbidden) - [x] 3.2 运行并通过相关测试:`go test -v ./tests/integration/...`(如存在既有失败,需明确区分是否由本变更引入) ## 4. 本地验证 - [x] 4.1 对修改过的 Go 文件执行 `lsp_diagnostics` 确保无新增错误/告警 - [x] 4.2 运行 `go test ./...` 做一次全量回归验证(如耗时可接受)