From b977fbca79f74f1a79c9ef4599189bd752c9d214 Mon Sep 17 00:00:00 2001 From: timerzz Date: Sun, 1 Sep 2024 17:01:50 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=90=9C=E7=B4=A2=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=B4=A7=E5=8F=B7=EF=BC=8C=E4=B8=8D=E5=8C=BA=E5=88=86=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/watcher/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/watcher/controller.go b/pkg/watcher/controller.go index 69db497..ba0f127 100644 --- a/pkg/watcher/controller.go +++ b/pkg/watcher/controller.go @@ -101,7 +101,7 @@ type ListWatcherInfoRequest struct { func (c *Controller) List(req ListWatcherInfoRequest) (resp web.ListResponse[model.WatchInfo], err error) { tx := c.db if req.Keyword != "" { - tx = tx.Where("name LIKE ? or remark LIKE ?", fmt.Sprintf("%%%s%%", req.Keyword), fmt.Sprintf("%%%s%%", req.Keyword)) + tx = tx.Where("name ilike ? or remark ilike ? or pid ilike ?", fmt.Sprintf("%%%s%%", req.Keyword), fmt.Sprintf("%%%s%%", req.Keyword), fmt.Sprintf("%%%s%%", req.Keyword)) } if !req.Website.IsZero() { tx = tx.Where("website = ?", req.Website)