<?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 <= #{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>
|