<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.iailab.module.device.dao.DeviceHealthAlarmDao">
|
|
<resultMap id="alarmCommonResult" type="com.iailab.module.device.dto.DeviceHealthAlarmDTO">
|
<result column="dev_name" property="devName"/>
|
<result column="fault_time" property="faultTime"/>
|
<collection property="deviceFaults" ofType="com.iailab.module.device.dto.DeviceFaultDTO">
|
<result column="index_type" property="indexType"/>
|
<result column="class_name" property="className"/>
|
<result column="fault_name" property="faultName"/>
|
<result column="solution" property="solution"/>
|
</collection>
|
|
</resultMap>
|
|
<select id="getInfo" resultMap="alarmCommonResult"
|
parameterType="java.lang.String">
|
SELECT
|
t1.dev_name,
|
t1.fault_time,
|
t2.fault_name,
|
t3.class_name,
|
t3.index_type,
|
t3.solution
|
FROM
|
t_device_health_alarm t1,
|
t_device_health_alarm_detail t2,
|
t_device_fault t3
|
WHERE
|
t1.id = t2.alarm_id
|
AND t2.fault_code = t3.fault_code
|
AND t1.id = #{id}
|
</select>
|
</mapper>
|