|
@@ -132,8 +132,14 @@ public class AlarmDefine {
|
|
|
condition.setTrigger(alarmCondition.getTriggerBackend());
|
|
|
condition.setEnd(alarmCondition.getEndBackend());
|
|
|
// 时间转换为秒
|
|
|
- condition.setTriggerUphold(alarmCondition.getTriggerUphold() * 60);
|
|
|
- condition.setEndUphold(alarmCondition.getEndUphold() * 60);
|
|
|
+ condition.setTriggerUphold(0);
|
|
|
+ if (alarmCondition.getTriggerUphold() != null) {
|
|
|
+ condition.setTriggerUphold(alarmCondition.getTriggerUphold() * 60);
|
|
|
+ }
|
|
|
+ condition.setEndUphold(0);
|
|
|
+ if (alarmCondition.getEndUphold() != null) {
|
|
|
+ condition.setEndUphold(alarmCondition.getEndUphold() * 60);
|
|
|
+ }
|
|
|
alarmDefine.setCondition(condition);
|
|
|
return alarmDefine;
|
|
|
}
|