From ebfdf0dcd71eb143047e7c115ed7d265e44c20a7 Mon Sep 17 00:00:00 2001 From: Echo <1711788888@qq.com> Date: Wed, 17 Sep 2025 20:10:47 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9F=A5=E8=AF=A2=E7=94=A8=E6=88=B7=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/user/user.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/service/user/user.go b/service/user/user.go index 8317b1e..56525d9 100644 --- a/service/user/user.go +++ b/service/user/user.go @@ -70,8 +70,13 @@ func (u *UserService) GetUserList(p request.GetUserListReq) (userList []user.Use if p.UserLabel != "" { db = db.Where("user_label = ?", p.UserLabel) } - if p.Status != 0 { - db = db.Where("status = ?", p.Status) + + if p.Status == 1 { + db = db.Where("status = 1") + } + + if p.Status == 2 { + db = db.Where("status = 0") } if p.Name != "" {