<?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="org.jeecg.modules.itdmDataHistory.mapper.ItdmWenxiangMapper">

    <resultMap type="org.jeecg.modules.itdmDataHistory.entity.ItdmWenxiang" id="WXGraphResult">
        <result property="id"    column="id"    />
        <result property="deviceId"    column="device_id"    />
        <result property="deviceName"    column="device_name"    />
        <result property="deviceNo"    column="device_no"    />
        <result property="temperature"    column="temperature"    />
        <result property="temperatureMax"    column="temperature_max"    />
        <result property="temperatureMin"    column="temperature_min"    />
        <result property="temperatureAlarm"    column="temperature_alarm"    />
        <result property="humidity"    column="humidity"    />
        <result property="humidityMax"    column="humidity_max"    />
        <result property="humidityMin"    column="humidity_min"    />
        <result property="humidityAlarm"    column="humidity_alarm"    />
        <result property="currentA"    column="current_a"    />
        <result property="currentAMax"    column="current_a_max"    />
        <result property="currentAMin"    column="current_a_min"    />
        <result property="currentAAlarm"    column="current_a_alarm"    />
        <result property="currentB"    column="current_b"    />
        <result property="currentBMax"    column="current_b_max"    />
        <result property="currentBMin"    column="current_b_min"    />
        <result property="currentBAlarm"    column="current_b_alarm"    />
        <result property="currentC"    column="current_c"    />
        <result property="currentCMax"    column="current_c_max"    />
        <result property="currentCMin"    column="current_c_min"    />
        <result property="currentCAlarm"    column="current_c_alarm"    />
        <result property="createTime"    column="create_time"    />
    </resultMap>


    <select id="selectWXGraphList" parameterType="java.lang.String" resultMap="WXGraphResult">
        select * from itdm_wenxiang
        where device_id = #{deviceId} and create_time &gt;= DATE_SUB(date_format(now(),'%Y-%m-%d %T'),INTERVAL 1 DAY )
    </select>

</mapper>
