From 6c0c6cafffd20728ce1240aa00c2bfe3d8d65001 Mon Sep 17 00:00:00 2001 From: xinian Date: Mon, 23 Mar 2026 00:21:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20JSONB=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=9F=A5=E8=AF=A2=E5=8F=98=E9=87=8F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/cool/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cool/service.go b/common/cool/service.go index 3e93f0c1..858b6cb2 100644 --- a/common/cool/service.go +++ b/common/cool/service.go @@ -352,8 +352,8 @@ func (s *Service) ServicePage(ctx context.Context, req *PageReq) (data interface } // 2. JSONB data->>'xxx' 字段查询(你要的 data 类查找) - if len(s.ListQueryOp.DataFieldEQ) > 0 { - for _, field := range s.ListQueryOp.DataFieldEQ { + if len(s.PageQueryOp.DataFieldEQ) > 0 { + for _, field := range s.PageQueryOp.DataFieldEQ { if val := r.Get(field); val.String() != "" { // 关键:拼接 data->>'字段名' = ? m.Where("data->>? = ?", field, val)