feiyu02
2024-01-09 c1becf4cbd2e99601ce011c14b8742427249cfb4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?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="cn.flightfeather.supervision.domain.ds2.mapper.FumeMinuteValueMapper">
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.FumeMinuteValue">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="MV_ID" jdbcType="INTEGER" property="mvId" />
    <result column="MV_Stat_Code" jdbcType="VARCHAR" property="mvStatCode" />
    <result column="MV_Create_Time" jdbcType="TIMESTAMP" property="mvCreateTime" />
    <result column="MV_Data_Time" jdbcType="TIMESTAMP" property="mvDataTime" />
    <result column="MV_Power_On_Time" jdbcType="TIMESTAMP" property="mvPowerOnTime" />
    <result column="MV_Recent_Down_Time" jdbcType="TIMESTAMP" property="mvRecentDownTime" />
    <result column="MV_signal" jdbcType="DOUBLE" property="mvSignal" />
    <result column="MV_Fan_Status" jdbcType="BIT" property="mvFanStatus" />
    <result column="MV_Purifier_Status" jdbcType="BIT" property="mvPurifierStatus" />
    <result column="MV_Fan_Electricity" jdbcType="DOUBLE" property="mvFanElectricity" />
    <result column="MV_Purifier_Electricity" jdbcType="DOUBLE" property="mvPurifierElectricity" />
    <result column="MV_Fume_Concentration" jdbcType="DOUBLE" property="mvFumeConcentration" />
    <result column="MV_Fume_Concentration2" jdbcType="DOUBLE" property="mvFumeConcentration2" />
    <result column="MV_PM" jdbcType="DOUBLE" property="mvPm" />
    <result column="MV_NMHC" jdbcType="DOUBLE" property="mvNmhc" />
    <result column="MV_Upload" jdbcType="BIT" property="mvUpload" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    MV_ID, MV_Stat_Code, MV_Create_Time, MV_Data_Time, MV_Power_On_Time, MV_Recent_Down_Time, 
    MV_signal, MV_Fan_Status, MV_Purifier_Status, MV_Fan_Electricity, MV_Purifier_Electricity, 
    MV_Fume_Concentration, MV_Fume_Concentration2, MV_PM, MV_NMHC, MV_Upload
  </sql>
 
  <select id="getRealTimeData" resultMap="BaseResultMap">
    SELECT
      *
    FROM
      (
        SELECT
          *
        FROM
          fd_t_minutevalue
        WHERE
          MV_Stat_Code IS NOT NULL
          AND MV_Data_Time IS NOT NULL
        ORDER BY
          MV_Data_Time DESC
        LIMIT 100000
      ) t
    GROUP BY
      MV_Stat_Code
  </select>
</mapper>