Browse Source

当报警条件中不包含触发和恢复时间时,触发和恢复时间默认设置为0

lixing 3 years ago
parent
commit
c860574e10

+ 2 - 0
AlarmEngineStarter/src/main/java/com/persagy/apm/energyalarmstarter/alarmengine/jms/AlarmEngineMsgHandler.java

@@ -300,10 +300,12 @@ public class AlarmEngineMsgHandler {
         alarmCondition.setInfoCodes(infoCodes);
         alarmCondition.setConfigs(condition.getConfigs());
         alarmCondition.setTriggerBackend(condition.getTrigger().replaceAll(alarmConfigItem.getObjId()+"_",""));
+        alarmCondition.setTriggerUphold(0);
         if (condition.getTriggerUphold() != null) {
             alarmCondition.setTriggerUphold(condition.getTriggerUphold()/60);
         }
         alarmCondition.setAlarmLevel(alarmConfigItem.getLevel());
+        alarmCondition.setEndUphold(0);
         if (condition.getEndUphold() != null) {
             alarmCondition.setEndUphold(condition.getEndUphold()/60);
         }