From de9dde640439022fa6fe3064dae7add05c51a195 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Thu, 20 Jul 2023 11:13:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=B4=A6=E6=88=B7=E5=90=8D?= =?UTF-8?q?=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/service/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/service/user.go b/api/service/user.go index 00420b2..78fda8f 100644 --- a/api/service/user.go +++ b/api/service/user.go @@ -234,7 +234,7 @@ func (r *UserService) PutUser(c *gin.Context, requestUserId int64, putUserReques if putUserRequest.Access != adminUser.Access { // 检测账号名 res, err := adminUserDao.GetAdminUserFirstByAccess(putUserRequest.Access) - if res != nil || err != nil { + if res != nil && err != nil { return false, errors.New("账号名重复") } }