From 58c8e0c3b772f5bf829dd3dcb6c12dec3ea97418 Mon Sep 17 00:00:00 2001 From: like Date: Fri, 21 Jul 2023 10:52:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=98=88=E5=80=BC=E8=8C=83=E5=9B=B4=E5=9B=9E?= =?UTF-8?q?=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bean/entity/alert_rules.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bean/entity/alert_rules.go b/src/bean/entity/alert_rules.go index e4cc8ed..984e1c9 100644 --- a/src/bean/entity/alert_rules.go +++ b/src/bean/entity/alert_rules.go @@ -36,8 +36,8 @@ type RulesAlertRange struct { } type AlertCondition struct { - ThresholdsMin *float64 `json:"thresholds_min" form:"thresholds_min" binding:"omitempty,required_without=Id"` - ThresholdsMax *float64 `json:"thresholds_max" form:"thresholds_max" binding:"omitempty"` + ThresholdsMin *float64 `json:"thresholds_min,omitempty" form:"thresholds_min" binding:"omitempty,required_without=ThresholdsMax"` + ThresholdsMax *float64 `json:"thresholds_max,omitempty" form:"thresholds_max" binding:"omitempty"` RiskLevel int `json:"risk_level" form:"risk_level" binding:"required,oneof=1 2 3 4"` } -- 2.26.0