<?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.TimedTaskDao">
	<!-- Result Map -->
	<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.eq.bean.TimedTask">
	    <result column="id" property="id"/>
	    <result column="start_time" property="startTime"/>
	    <result column="end_time" property="endTime"/>
	    <result column="create_user_id" property="createUserId"/>
	    <result column="create_time" property="createTime"/>
	    <result column="update_user_id" property="updateUserId"/>
	    <result column="update_time" property="updateTime"/>
	    <result column="status" property="status"/>
	    <result column="deleted" property="deleted"/>
	    <result column="station_id" property="stationId"/>
	    <result column="byx1" property="byx1"/>
	    <result column="byx2" property="byx2"/>
	    <result column="byx3" property="byx3"/>
	    <result column="business_type" property="businessType"/>
	    <result column="type" property="type"/>
	    <result column="temperature" property="temperature"/>
	</resultMap>

	<!-- timed_task table all fields -->
	<sql id="Base_Column_List">
		id,start_time,end_time,create_user_id,create_time,update_user_id,update_time,status,deleted,station_id,byx1,byx2,byx3,business_type,type,temperature
	</sql>

	<!-- 公共查询条件 -->
	<sql id="Example_Where_Clause">
		where t.deleted=0
		<if test="id!=null and id!=''">and t.id = #{id}</if>
		<if test="startTime!=null and startTime!=''">and t.start_time = #{startTime}</if>
		<if test="endTime!=null and endTime!=''">and t.end_time = #{endTime}</if>
		<if test="createUserId!=null and createUserId!=''">and t.create_user_id = #{createUserId}</if>
		<if test="createTime!=null ">and t.create_time = #{createTime}</if>
		<if test="updateUserId!=null and updateUserId!=''">and t.update_user_id = #{updateUserId}</if>
		<if test="updateTime!=null ">and t.update_time = #{updateTime}</if>
		<if test="status!=null ">and t.status = #{status}</if>
		<if test="deleted!=null ">and t.deleted = #{deleted}</if>
		<if test="stationId!=null and stationId!=''">and t.station_id = #{stationId}</if>
		<if test="byx1!=null and byx1!=''">and t.byx1 = #{byx1}</if>
		<if test="byx2!=null and byx2!=''">and t.byx2 = #{byx2}</if>
		<if test="byx3!=null and byx3!=''">and t.byx3 = #{byx3}</if>
		<if test="businessType!=null ">and t.business_type = #{businessType}</if>
		<if test="type!=null ">and t.type = #{type}</if>
		<if test="temperature!=null and temperature!=''">and t.temperature = #{temperature}</if>
	</sql>

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

	<select id="queryPageList" parameterType="Object" resultMap="BaseResultMap">
	select t.* from timed_task 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>


