Bläddra i källkod

查询告警详情,增加告警处理人‘ame字段

missMyLove 3 år sedan
förälder
incheckning
757244ffd7

+ 5 - 0
src/main/java/com/comtika/safe/dao/safe/IWarnRecordDao.java

@@ -4,6 +4,7 @@ import com.comtika.safe.entity.warn.WarnRecord;
 import com.comtika.safe.entity.warn.help.WarnHelp;
 import com.comtika.safe.entity.warn.help.WarnHomeHelp;
 import com.comtika.safe.entity.warn.help.WarnMonthHelp;
+import org.beetl.sql.core.annotatoin.Sql;
 import org.beetl.sql.core.annotatoin.SqlResource;
 import org.beetl.sql.core.engine.PageQuery;
 import org.beetl.sql.core.mapper.BaseMapper;
@@ -28,4 +29,8 @@ public interface IWarnRecordDao extends BaseMapper<WarnRecord> {
     List<WarnHomeHelp> findWarnHomeTotal(Map<String, Object> condition);
 
     int findWarnTotal(Map<String, Object> condition);
+
+
+    @Sql(value = "select r.*,su.`name` from warn_record r LEFT JOIN sys_user su on r.handle_user_id = su.user_id where r.id = ? limit 1")
+    Map<String, Object> findWarnRecordInfo(Integer id);
 }

+ 3 - 2
src/main/java/com/comtika/safe/service/warn/impl/WarnServiceImpl.java

@@ -409,8 +409,9 @@ public class WarnServiceImpl implements IWarnService {
 
     @Override
     public RespWrapper findWarnInfo(Integer id) {
-        WarnRecord single = iWarnRecordDao.single(id);
-        return RespWrapper.makeSuccessResp(single);
+        // WarnRecord single = iWarnRecordDao.single(id);
+        Map<String,Object> map = iWarnRecordDao.findWarnRecordInfo(id);
+        return RespWrapper.makeSuccessResp(map);
     }
 
     private String handlePrefix(String terminalNo, Boolean isMain,int plugNo) {