From 28571752668f2233362e55bd6e34604ee012a2a5 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 14 Jan 2026 17:10:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor(account):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/model/account_dto.go | 8 ++++---- internal/routes/account.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/model/account_dto.go b/internal/model/account_dto.go index 5519a48..3623533 100644 --- a/internal/model/account_dto.go +++ b/internal/model/account_dto.go @@ -83,12 +83,12 @@ type PlatformAccountListRequest struct { // UpdatePasswordParams 修改密码参数(用于 OpenAPI 生成) type UpdatePasswordParams struct { - ID uint `params:"id" description:"账号ID"` - RequestBody UpdatePasswordRequest `json:"body" description:"请求体"` + IDReq + UpdatePasswordRequest } // UpdateStatusParams 状态切换参数(用于 OpenAPI 生成) type UpdateStatusParams struct { - ID uint `params:"id" description:"账号ID"` - RequestBody UpdateStatusRequest `json:"body" description:"请求体"` + IDReq + UpdateStatusRequest } diff --git a/internal/routes/account.go b/internal/routes/account.go index f456af5..a11935e 100644 --- a/internal/routes/account.go +++ b/internal/routes/account.go @@ -141,7 +141,7 @@ func registerPlatformAccountRoutes(api fiber.Router, h *admin.AccountHandler, do Output: new([]model.Role), }) - Register(platformAccounts, doc, groupPath, "DELETE", "/:id/roles/:role_id", h.RemoveRole, RouteSpec{ + Register(platformAccounts, doc, groupPath, "DELETE", "/:account_id/roles/:role_id", h.RemoveRole, RouteSpec{ Summary: "移除角色", Tags: []string{"PlatformAccount"}, Input: new(model.RemoveRoleParams),