|
@@ -42,6 +42,12 @@ public class AlarmConfigServiceImpl {
|
|
|
return DmpResultUtil.singleConvert(alarmConfig, DmpUpsertVO.class);
|
|
|
}
|
|
|
|
|
|
+ public DmpResult<DmpUpsertVO> update(UpdateAlarmConfigDTO updateAlarmConfigDTO) throws Exception{
|
|
|
+ JSONObject jsonObject = Obj2JSONObject.convert(updateAlarmConfigDTO);
|
|
|
+ DmpResult<JSONObject> alarmConfig = alarmClient.updateAlarmConfig(updateAlarmConfigDTO.fetchParams(), jsonObject);
|
|
|
+ return DmpResultUtil.singleConvert(alarmConfig, DmpUpsertVO.class);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 查询报警条件
|
|
|
*
|
|
@@ -72,6 +78,12 @@ public class AlarmConfigServiceImpl {
|
|
|
return DmpResultUtil.multiConvert(result, AlarmConfigItem.class);
|
|
|
}
|
|
|
|
|
|
+ public DmpResult<DmpUpsertVO> update(AddAlarmConfigDTO addAlarmConfigDTO) throws Exception{
|
|
|
+ JSONObject jsonObject = Obj2JSONObject.convert(addAlarmConfigDTO);
|
|
|
+ DmpResult<JSONObject> alarmConfig = alarmClient.createAlarmConfig(addAlarmConfigDTO.fetchParams(), jsonObject);
|
|
|
+ return DmpResultUtil.singleConvert(alarmConfig, DmpUpsertVO.class);
|
|
|
+ }
|
|
|
+
|
|
|
public static void main(String[] args) throws Exception{
|
|
|
AddAlarmConfigDTO addAlarmConfigDTO = new AddAlarmConfigDTO();
|
|
|
addAlarmConfigDTO.setObjId("1");
|