From 984cecaa40100ee69e9038082a477e6af5d56aca Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期五, 21 三月 2025 11:27:24 +0800
Subject: [PATCH] ALARM_TITLE

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmConfigServiceImpl.java |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmConfigServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmConfigServiceImpl.java
index 42b9252..50d5fcc 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmConfigServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmConfigServiceImpl.java
@@ -5,12 +5,11 @@
 import com.iailab.framework.common.pojo.PageResult;
 import com.iailab.framework.common.service.impl.BaseServiceImpl;
 import com.iailab.framework.common.util.object.BeanUtils;
+import com.iailab.framework.common.util.object.ConvertUtils;
 import com.iailab.framework.security.core.util.SecurityFrameworkUtils;
 import com.iailab.module.model.api.mcs.dto.AlarmConfigRespDTO;
 import com.iailab.module.model.mcs.pre.dao.MmPredictAlarmConfigDao;
-import com.iailab.module.model.mcs.pre.entity.DmModuleEntity;
 import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmConfigEntity;
-import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmMessageEntity;
 import com.iailab.module.model.mcs.pre.service.MmPredictAlarmConfigService;
 import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigPageReqVO;
 import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigRespVO;
@@ -66,6 +65,16 @@
     public List<AlarmConfigRespDTO> list(Map<String, Object> params) {
         QueryWrapper<MmPredictAlarmConfigEntity> wrapper = new QueryWrapper<>();
         wrapper.eq("is_enable", 1);
-        return BeanUtils.toBean(baseDao.selectList(wrapper), AlarmConfigRespDTO.class);
+        wrapper.eq(StringUtils.isNotBlank(params.get("alarmObj").toString()),"alarm_obj", params.get("alarmObj"));
+        List<MmPredictAlarmConfigEntity> list = baseDao.selectList(wrapper);
+        return ConvertUtils.sourceToTarget(list, AlarmConfigRespDTO.class);
+    }
+
+    @Override
+    public void updateByAlarmObj(MmPredictAlarmConfigSaveReqVO reqVO) {
+        QueryWrapper<MmPredictAlarmConfigEntity> wrapper = new QueryWrapper<>();
+        wrapper.eq("is_enable", 1);
+        wrapper.eq(StringUtils.isNotBlank(reqVO.getAlarmObj()),"alarm_obj", reqVO.getAlarmObj());
+        baseDao.update(ConvertUtils.sourceToTarget(reqVO, MmPredictAlarmConfigEntity.class), wrapper);
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3