From df918c88f9ac9640503a2140f1a0b3d460925b44 Mon Sep 17 00:00:00 2001 From: Sans Date: Thu, 19 Mar 2026 18:43:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20AND=E6=9D=A1=E4=BB=B6=E6=B2=A1=E4=BC=A0?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lxDb/model.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lxDb/model.go b/lxDb/model.go index d6df345..82fea2c 100644 --- a/lxDb/model.go +++ b/lxDb/model.go @@ -2,11 +2,12 @@ package lxDb import ( "fmt" - "gitea.listensoft.net/tool/lxutils/lxUtil" - "gorm.io/gorm" "reflect" "strings" "time" + + "gitea.listensoft.net/tool/lxutils/lxUtil" + "gorm.io/gorm" ) type BaseModel struct { @@ -187,7 +188,7 @@ func (q *PaginationQuery) Build(tx *gorm.DB) *gorm.DB { field := fmt.Sprintf("%s = ?", con.Field) tx = tx.Or(field, con.Arg) case "and": - tx = tx.Where(con.Field) // 自定义条件, 如: (length(field) = 4 OR length(field) = 6) + tx = tx.Where(con.Field, con.Args...) // 自定义条件, 如: (length(field) = 4 OR length(field) = 6) case "group": tx = tx.Group(con.Field) case "join":