From 6f7daf5046ad2f56699f38f9b0a6d0177b326a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=8B=A5?= Date: Sun, 8 Mar 2026 11:05:47 +0800 Subject: [PATCH] =?UTF-8?q?sync:=20soul-api=20=E6=8E=A5=E5=8F=A3=E9=80=BB?= =?UTF-8?q?=E8=BE=91=20|=20=E5=8E=9F=E5=9B=A0:=20=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- soul-api/internal/handler/db.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/soul-api/internal/handler/db.go b/soul-api/internal/handler/db.go index f161f9e2..313e23b5 100644 --- a/soul-api/internal/handler/db.go +++ b/soul-api/internal/handler/db.go @@ -531,7 +531,9 @@ func DBUsersList(c *gin.Context) { pattern := "%" + search + "%" q = q.Where("COALESCE(nickname,'') LIKE ? OR COALESCE(phone,'') LIKE ? OR id LIKE ?", pattern, pattern, pattern) } - if vipFilter == "true" || vipFilter == "1" { + if poolFilter == "complete" { + q = q.Where("(phone IS NOT NULL AND phone != '') AND (nickname IS NOT NULL AND nickname != '')") + } else if vipFilter == "true" || vipFilter == "1" { q = q.Where("id IN (SELECT user_id FROM orders WHERE product_type IN ? AND (status = ? OR status = ?)) OR (is_vip = 1 AND vip_expire_date > ?)", []string{"fullbook", "vip"}, "paid", "completed", time.Now()) }