From aeb2a0c4f96a281be8404e45ce6e2f222d421a89 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 14:44:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=AF=B7=E6=B1=82ID=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E8=AE=BF=E9=97=AE=E6=97=A5=E5=BF=97=E6=97=B6=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8E=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E7=9A=84=E7=A9=BA?= =?UTF-8?q?=E6=A0=BC=E5=92=8C=E5=8F=A5=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/db/models/http_access_log_dao.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/db/models/http_access_log_dao.go b/internal/db/models/http_access_log_dao.go index ce1f99c3..1fd1b670 100644 --- a/internal/db/models/http_access_log_dao.go +++ b/internal/db/models/http_access_log_dao.go @@ -330,9 +330,9 @@ func (this *HTTPAccessLogDAO) listAccessLogs(tx *dbs.Tx, lastRequestId string, s query.Param("intKeyword2", types.Int(pieces[1])) } - if regexp.MustCompile(`^\d{20,}$`).MatchString(keyword) { + if regexp.MustCompile(`^\d{20,}\s*\.?$`).MatchString(keyword) { where += " OR requestId=:requestId" - query.Param("requestId", keyword) + query.Param("requestId", strings.TrimRight(keyword, ". ")) } query.Where("("+where+")").