IP阈值动作增加WebHook

This commit is contained in:
GoEdgeLab
2021-09-14 15:27:48 +08:00
parent c2831398c8
commit 5e5e6dc035
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()
}