From 9db940150aab844b33b8c0cfef2430ba5687b211 Mon Sep 17 00:00:00 2001 From: ninstein Date: Wed, 18 Aug 2021 14:45:22 +0800 Subject: [PATCH] =?UTF-8?q?BUGFIX:=E8=A7=92=E8=89=B2=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E5=B8=B8=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 切换角色状态时参数传递丢失,导致切换异常新增了一条空记录 --- app/admin/apis/sys_role.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/apis/sys_role.go b/app/admin/apis/sys_role.go index 7e28a671..f83e3657 100644 --- a/app/admin/apis/sys_role.go +++ b/app/admin/apis/sys_role.go @@ -227,7 +227,7 @@ func (e SysRole) Update2Status(c *gin.Context) { req := dto.UpdateStatusReq{} err := e.MakeContext(c). MakeOrm(). - Bind(&req). + Bind(&req, binding.JSON, nil). MakeService(&s.Service). Errors if err != nil { @@ -279,4 +279,4 @@ func (e SysRole) Update2DataScope(c *gin.Context) { return } e.OK(nil, "操作成功") -} \ No newline at end of file +}