From 2ed5aaa5ab968535fc9afa364df0e72b77d29676 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Mon, 6 May 2024 08:56:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=BD=BF=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E5=8F=B7=E6=90=9C=E7=B4=A2IP=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/db/models/ip_list_dao.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/db/models/ip_list_dao.go b/internal/db/models/ip_list_dao.go index c97e7207..f6e6f654 100644 --- a/internal/db/models/ip_list_dao.go +++ b/internal/db/models/ip_list_dao.go @@ -264,7 +264,7 @@ func (this *IPListDAO) CountAllEnabledIPLists(tx *dbs.Tx, listType string, isPub Attr("type", listType). Attr("isPublic", isPublic) if len(keyword) > 0 { - query.Where("(name LIKE :keyword OR description LIKE :keyword)"). + query.Where("(name LIKE :keyword OR description LIKE :keyword OR code LIKE :keyword)"). Param("keyword", dbutils.QuoteLike(keyword)) } return query.Count() @@ -277,7 +277,7 @@ func (this *IPListDAO) ListEnabledIPLists(tx *dbs.Tx, listType string, isPublic Attr("type", listType). Attr("isPublic", isPublic) if len(keyword) > 0 { - query.Where("(name LIKE :keyword OR description LIKE :keyword)"). + query.Where("(name LIKE :keyword OR description LIKE :keyword OR code LIKE :keyword)"). Param("keyword", dbutils.QuoteLike(keyword)) } _, err = query.Offset(offset).