<?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.inspect.infrared.mapper.InfraredMapper">

    <resultMap type="com.inspect.infrared.domain.InfraredEntity" id="InfraredResult">
        <result property="coordinate" column="coordinate"/>
        <result property="warnMaxTemp" column="warn_max_temp"/>
        <result property="warnMinTemp" column="warn_min_temp"/>
        <result property="alarmMaxTemp" column="alarm_max_temp"/>
        <result property="alarmMinTemp" column="alarm_min_temp"/>
    </resultMap>

    <select id="selectCoordinate" parameterType="String" resultMap="InfraredResult">
        select b.coordinate, b.warn_max_temp, b.warn_min_temp, b.alarm_max_temp, b.alarm_min_temp
        from patrol_preset_pos a
                 left join patrol_preset_param b on a.preset_pos_id = b.preset_pos_id
        where a.patrol_point_id = #{patrolpointId}
    </select>

</mapper>