From af363868e822894faf483f1c2800d968ad52d4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A1=80=E5=B0=BC=E9=BE=9F?= <365252428@qq.com> Date: Sat, 22 Feb 2025 19:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/account.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/service/account.go b/pkg/service/account.go index 1e93851..f2d7cec 100644 --- a/pkg/service/account.go +++ b/pkg/service/account.go @@ -648,6 +648,9 @@ func (a *AccountProvider) UserList(ctx context.Context, in *account.UserListRequ if in.AuditStatus != 0 { modelObj.Where("status = ? ", in.AuditStatus) } + if in.Sex != 0 { + modelObj.Where("real_name.sex = ? ", in.Sex) + } modelObj.Count(&count) if in.Page > 0 && in.PageSize > 0 { modelObj.Limit(int(in.PageSize)).Offset(page.GetOffset(in.Page, in.PageSize))