<?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.huatek.busi.mapper.WarningResultMapper">
    <select id="findWarningInfo" resultType="com.huatek.busi.vo.warning.BusiEqmWarningTaskVo">
        SELECT
            t.id as id,
            t.sensor_id as sensorId,
            t.warning_time as warningTime,
            t.eq_type as eqType,
            t.gz_type as gzType,
            t.sensor_install_location as sensorInstallLocation,
            f.warning_id as warningId,
            f.warning_info as warningInfo
        FROM
            `busi_eqm_warning` t
        LEFT JOIN
            busi_eqm_warning_info f on t.id = f.warning_id
        where t.id = #{id}
    </select>
    <select id="findWarningEqm" resultType="java.util.Map">
        SELECT
            t.id as id,
            t.sensor_id as sensorId,
            t.warning_time as warningTime,
            t.eq_type as eqType,
            t.gz_type as gzType,
            t.sensor_install_location as sensorInstallLocation,
            f.warning_id as warningId,
            f.warning_info as warningInfo
        FROM
            `busi_eqm_warning` t
        LEFT JOIN
            busi_eqm_warning_info f on t.id = f.warning_id
        where t.id = #{warningId}
    </select>
</mapper>
