mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-11 21:00:24 +08:00
支持使用请求ID搜索访问日志
This commit is contained in:
@@ -330,6 +330,11 @@ func (this *HTTPAccessLogDAO) listAccessLogs(tx *dbs.Tx, lastRequestId string, s
|
|||||||
query.Param("intKeyword2", types.Int(pieces[1]))
|
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+")").
|
query.Where("("+where+")").
|
||||||
Param("keyword", "%"+keyword+"%")
|
Param("keyword", "%"+keyword+"%")
|
||||||
if useOriginKeyword {
|
if useOriginKeyword {
|
||||||
|
|||||||
Reference in New Issue
Block a user