<?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.ruoyi.monitoring.mapper.CmcTemperatureMapper">
    
    <resultMap type="com.ruoyi.monitoring.domain.CmcTemperature" id="CmcTemperatureResult">
    	<id     property="Id"      column="ID"      />
        <result property="GroupNo"    column="Group_No"    />
        <result property="SensorNo"     column="Sensor_No"     />
        <result property="Datetime"   column="DateTime"   />
        <result property="Data"    column="Data"    />
        <result property="Volt"      column="Volt"      />
        <result property="CSQ"    column="CSQ"    />
    </resultMap>

    <sql id="selectTemperatureVo">
        SELECT d.ID, d.Group_No, d.Sensor_No, d.DateTime, d.Data, d.Volt, d.CSQ
        FROM Data d
    </sql>

    <select id="listTemperature" parameterType="com.ruoyi.monitoring.domain.CmcTemperature" resultMap="CmcTemperatureResult">
        <include refid="selectTemperatureVo"/>
        <where>
            <if test="Id != null ">d.ID = #{Id}</if>
            <if test="GroupNo != null ">d.Group_No = #{GroupNo}</if>
            <if test="SensorNo != null ">d.Sensor_No = #{SensorNo}</if>
            <if test="Data != null ">d.Data = #{Data}</if>
            <if test="Volt != null ">d.Volt = #{Volt}</if>
            <if test="CSQ != null ">d.CSQ = #{CSQ}</if>
        </where>
    </select>

</mapper>