feat: 后台管理新增 UpdateRealnameMode 接口并注册路由 PATCH /api/admin/assets/:identifier/realname-mode

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-17 17:32:18 +08:00
parent 363e0efb34
commit c5ed040359
3 changed files with 57 additions and 1 deletions

View File

@@ -118,4 +118,13 @@ func registerAssetRoutes(router fiber.Router, handler *admin.AssetHandler, walle
Output: new(dto.UpdateAssetPollingStatusResponse),
Auth: true,
})
Register(assets, doc, groupPath, "PATCH", "/:identifier/realname-mode", handler.UpdateRealnamePolicy, RouteSpec{
Summary: "更新资产实名认证策略",
Description: "更新指定资产IoT卡或设备的实名认证策略支持 none/before_order/after_order 三种模式。",
Tags: []string{"资产管理"},
Input: new(dto.UpdateAssetRealnamePolicyRequest),
Output: new(dto.UpdateAssetRealnamePolicyResponse),
Auth: true,
})
}