|
@@ -326,6 +326,23 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public void saveDeleterOrUpdateByPk(MonitorIndicatorRecord monitorIndicatorRecord) throws Exception {
|
|
|
+ MonitorIndicatorRecord query = new MonitorIndicatorRecord();
|
|
|
+ query.setProject(monitorIndicatorRecord.getProject());
|
|
|
+ query.setObjId(monitorIndicatorRecord.getObjId());
|
|
|
+ query.setDataTime(monitorIndicatorRecord.getDataTime());
|
|
|
+ // query.setSplitTimeType(EnumTimeType.MIN15.getCode());
|
|
|
+ query.setMonitorIndicatorId(monitorIndicatorRecord.getMonitorIndicatorId());
|
|
|
+ List<MonitorIndicatorRecord> queryList = coredao.query(query);
|
|
|
+ if (CollectionUtils.isEmpty(queryList)) {//新增
|
|
|
+ coredao.save(monitorIndicatorRecord);
|
|
|
+ } else {
|
|
|
+ coredao.remove(query);
|
|
|
+ coredao.save(monitorIndicatorRecord);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public void cleanAlarmConfig(String projectId) {
|
|
|
if (StringUtils.isBlank(projectId)) {
|
|
|
redisUtil.del(DiAgnoseConst.RedisConstants.PROJECT_ALARM_ITEM);
|