SwqxzInfoHourMapper.xml 2.99 KB
Newer Older
co_dengxiongwen's avatar
co_dengxiongwen committed
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 54 55 56 57 58 59 60 61 62
<?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.devplatform.admin.modules.eq.dao.SwqxzInfoHourDao">
	<!-- Result Map -->
	<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.SwqxzInfoHour">
	    <result column="id" property="id"/>
	    <result column="resource_id" property="resourceId"/>
	    <result column="temperature" property="temperature"/>
	    <result column="humidity" property="humidity"/>
	    <result column="wind_speed" property="windSpeed"/>
	    <result column="wind_direction" property="windDirection"/>
	    <result column="illuminance" property="illuminance"/>
	    <result column="carbon_dioxide" property="carbonDioxide"/>
	    <result column="fine_particles" property="fineParticles"/>
	    <result column="radiation" property="radiation"/>
	    <result column="type" property="type"/>
	    <result column="station_id" property="stationId"/>
	    <result column="create_time" property="createTime"/>
	</resultMap>

	<!-- swqxz_info_hour table all fields -->
	<sql id="Base_Column_List">
		id,resource_id,temperature,humidity,wind_speed,wind_direction,illuminance,carbon_dioxide,fine_particles,radiation,type,station_id,create_time
	</sql>

	<!-- 公共查询条件 -->
	<sql id="Example_Where_Clause">
		where t.deleted=0
		<if test="id!=null and id!=''">and t.id = #{id}</if>
		<if test="resourceId!=null and resourceId!=''">and t.resource_id = #{resourceId}</if>
		<if test="temperature!=null and temperature!=''">and t.temperature = #{temperature}</if>
		<if test="humidity!=null and humidity!=''">and t.humidity = #{humidity}</if>
		<if test="windSpeed!=null and windSpeed!=''">and t.wind_speed = #{windSpeed}</if>
		<if test="windDirection!=null and windDirection!=''">and t.wind_direction = #{windDirection}</if>
		<if test="illuminance!=null and illuminance!=''">and t.illuminance = #{illuminance}</if>
		<if test="carbonDioxide!=null and carbonDioxide!=''">and t.carbon_dioxide = #{carbonDioxide}</if>
		<if test="fineParticles!=null and fineParticles!=''">and t.fine_particles = #{fineParticles}</if>
		<if test="radiation!=null and radiation!=''">and t.radiation = #{radiation}</if>
		<if test="type!=null ">and t.type = #{type}</if>
		<if test="stationId!=null and stationId!=''">and t.station_id = #{stationId}</if>
		<if test="createTime!=null ">and t.create_time = #{createTime}</if>
	</sql>

	<select id="queryPageByCount" parameterType="Object" resultType="java.lang.Integer">
	select count(1) from swqxz_info_hour t
	<include refid="Example_Where_Clause"/>
	</select>

	<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
	select t.* from swqxz_info_hour t
	<include refid="Example_Where_Clause"/>
	<if test="pager.orderCondition != null and pager.orderCondition != ''">
		${pager.orderCondition}
	</if>
	<if test="pager.mysqlQueryCondition != null and pager.mysqlQueryCondition != ''">
		${pager.mysqlQueryCondition}
	</if>
	</select>

</mapper>