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)