mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 15:00:27 +08:00
修复通过IP查询IP名单时没有过滤已删除IP的Bug
This commit is contained in:
@@ -322,6 +322,7 @@ func (this *IPItemDAO) FindEnabledItemContainsIP(tx *dbs.Tx, listId int64, ip ui
|
||||
// FindEnabledItemsWithIP 根据IP查找Item
|
||||
func (this *IPItemDAO) FindEnabledItemsWithIP(tx *dbs.Tx, ip string) (result []*IPItem, err error) {
|
||||
_, err = this.Query(tx).
|
||||
State(IPItemStateEnabled).
|
||||
Attr("ipFrom", ip).
|
||||
Attr("ipTo", "").
|
||||
Where("(expiredAt=0 OR expiredAt>:nowTime)").
|
||||
|
||||
Reference in New Issue
Block a user