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
<?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.ds3.mapper.JSDustDataMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds3.entity.JSDustData" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="mn_code" property="mnCode" jdbcType="VARCHAR" />
    <result column="dust_value" property="dustValue" jdbcType="DOUBLE" />
    <result column="noise_value" property="noiseValue" jdbcType="DOUBLE" />
    <result column="lst" property="lst" jdbcType="TIMESTAMP" />
    <result column="quality" property="quality" jdbcType="VARCHAR" />
    <result column="grade" property="grade" jdbcType="INTEGER" />
    <result column="flag" property="flag" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, mn_code, dust_value, noise_value, lst, quality, grade, flag
  </sql>
 
  <select id="getDataBySceneType" resultMap="BaseResultMap">
    SELECT a.* FROM
    (SELECT
    *
    FROM
    ja_t_dust_site_data_info
    <where>
      flag = 'N'
      <if test="st != null">
        AND lst >= #{st}
      </if>
      <if test="et != null">
        AND lst &lt;= #{et}
      </if>
    </where>
    LIMIT #{startIndex}, #{perPage}
    ) AS a
    LEFT JOIN ja_t_dust_site_info AS b ON a.mn_code = b.mn_code
    WHERE b.type_id = #{sceneType}
  </select>
</mapper>