From 4f05671af22385824c9655a4e6a1532a949e7dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Thu, 2 Dec 2021 11:50:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BD=BF=E7=94=A8=E8=AF=B7?= =?UTF-8?q?=E6=B1=82ID=E6=90=9C=E7=B4=A2=E8=AE=BF=E9=97=AE=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/db/models/http_access_log_dao.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/db/models/http_access_log_dao.go b/internal/db/models/http_access_log_dao.go index 24b6f8d7..ce1f99c3 100644 --- a/internal/db/models/http_access_log_dao.go +++ b/internal/db/models/http_access_log_dao.go @@ -330,6 +330,11 @@ func (this *HTTPAccessLogDAO) listAccessLogs(tx *dbs.Tx, lastRequestId string, s query.Param("intKeyword2", types.Int(pieces[1])) } + if regexp.MustCompile(`^\d{20,}$`).MatchString(keyword) { + where += " OR requestId=:requestId" + query.Param("requestId", keyword) + } + query.Where("("+where+")"). Param("keyword", "%"+keyword+"%") if useOriginKeyword {