From ecf1b5bc561b65ee6abef2ec9bc24bcf0dc09d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?piexlMax=28=E5=A5=87=E6=B7=BC?= Date: Mon, 21 Apr 2025 15:08:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E4=BB=A3=E7=A0=81enum=E6=9F=A5=E8=AF=A2=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/utils/autocode/template_funcs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/utils/autocode/template_funcs.go b/server/utils/autocode/template_funcs.go index 26b1d272..6395a8cb 100644 --- a/server/utils/autocode/template_funcs.go +++ b/server/utils/autocode/template_funcs.go @@ -121,13 +121,13 @@ func GenerateSearchConditions(fields []*systemReq.AutoCodeField) string { if field.FieldSearchType == "LIKE" { condition = fmt.Sprintf(` if info.%s != "" { - db = db.Where("%s LIKE ?", "%%"+ *info.%s+"%%") + db = db.Where("%s LIKE ?", "%%"+ info.%s+"%%") }`, field.FieldName, field.ColumnName, field.FieldName) } else { condition = fmt.Sprintf(` if info.%s != "" { - db = db.Where("%s %s ?", *info.%s) + db = db.Where("%s %s ?", info.%s) }`, field.FieldName, field.ColumnName, field.FieldSearchType, field.FieldName) }