mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-01 21:30:27 +08:00
可以使用代号搜索IP名单
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user