增加若干API

This commit is contained in:
GoEdgeLab
2023-12-20 15:08:05 +08:00
parent c2ae24525c
commit ff1a5bdce9
9 changed files with 147 additions and 27 deletions

View File

@@ -339,3 +339,16 @@ func (this *IPListDAO) NotifyUpdate(tx *dbs.Tx, listId int64, taskType NodeTaskT
return nil
}
// FindServerIdWithListId 查找IP名单对应的网站ID
func (this *IPListDAO) FindServerIdWithListId(tx *dbs.Tx, listId int64) (serverId int64, err error) {
if listId <= 0 {
return
}
serverId, err = this.Query(tx).
Pk(listId).
Result("serverId").
FindInt64Col(0)
return
}