Browse Source

修改config字段类型

xujiaheng 3 years ago
parent
commit
a2fdb425f9

+ 1 - 1
AlarmDataStarter/src/main/java/com/persagy/apm/energyalarmstarter/alarmdata/model/dto/AlarmCondition.java

@@ -39,7 +39,7 @@ public class AlarmCondition {
     /**
      * 存储用户自定义的配置
      */
-    private JSONObject configs;
+    private String configs;
     /**
      * 报警规则
      */

+ 2 - 2
AlarmEngineStarter/src/main/java/com/persagy/apm/energyalarmstarter/alarmengine/feign/AlarmCondition.java

@@ -81,10 +81,10 @@ public class AlarmCondition {
     /**
      * 生效时间详情
      */
-    private JSONObject effectTimeDetail;
+    private String effectTimeDetail;
 
     /**
      * 数据中台中需要展示给前端的内容
      */
-    private JSONObject configs;
+    private String configs;
 }

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

@@ -296,7 +296,7 @@ public class AlarmEngineMsgHandler {
         alarmCondition.setEndBackend(alarmConfigItem.getCondition().getEnd().replaceAll(alarmConfigItem.getObjId()+"_",""));
         //  alarmCondition.setEndRules(null);
         alarmCondition.setEffectTimeType(alarmConfigItem.getCondition().getEffectTime().getType());
-        alarmCondition.setEffectTimeDetail((JSONObject) JSONObject.toJSON(alarmConfigItem.getCondition().getEffectTime()));
+        alarmCondition.setEffectTimeDetail(JSONObject.toJSONString(alarmConfigItem.getCondition().getEffectTime()));
         return alarmCondition;
     }
 }