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 != "" {