IP阈值动作增加WebHook

This commit is contained in:
刘祥超
2021-09-14 15:27:48 +08:00
parent 51b938b9c7
commit ea915582c1
3 changed files with 14 additions and 4 deletions

View File

@@ -242,3 +242,11 @@ func (this *NodeIPAddressThresholdDAO) ExistsEnabledThreshold(tx *dbs.Tx, thresh
State(NodeIPAddressThresholdStateEnabled).
Exist()
}
// UpdateThresholdIsMatched 设置是否匹配
func (this *NodeIPAddressThresholdDAO) UpdateThresholdIsMatched(tx *dbs.Tx, thresholdId int64, isMatched bool) error {
return this.Query(tx).
Pk(thresholdId).
Set("isMatched", isMatched).
UpdateQuickly()
}