<?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.sys.dao.SysResourceRunningTimeTjDao">
	<!-- Result Map -->
	<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.sys.bean.SysResourceRunningTimeTj">
	    <result column="id" property="id"/>
	    <result column="resource_id" property="resourceId"/>
	    <result column="running_time_total" property="runningTimeTotal"/>
	    <result column="running_time_sd" property="runningTimeSd"/>
	    <result column="running_time_jn" property="runningTimeJn"/>
	    <result column="update_user_id" property="updateUserId"/>
	    <result column="update_time" property="updateTime"/>
	    <result column="station_id" property="stationId"/>
	</resultMap>

	<!-- sys_resource_running_time_tj table all fields -->
	<sql id="Base_Column_List">
		id,resource_id,running_time_total,running_time_sd,running_time_jn,update_user_id,update_time,station_id
	</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="runningTimeTotal!=null and runningTimeTotal!=''">and t.running_time_total = #{runningTimeTotal}</if>
		<if test="runningTimeSd!=null and runningTimeSd!=''">and t.running_time_sd = #{runningTimeSd}</if>
		<if test="runningTimeJn!=null and runningTimeJn!=''">and t.running_time_jn = #{runningTimeJn}</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="stationId!=null and stationId!=''">and t.station_id = #{stationId}</if>
	</sql>

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

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


