SysSystemRunningTimeMapper.xml 2.02 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
<?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.SysSystemRunningTimeDao">
	<!-- Result Map -->
	<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.sys.bean.SysSystemRunningTime">
	    <result column="id" property="id"/>
	    <result column="type" property="type"/>
	    <result column="start_time" property="startTime"/>
	    <result column="end_time" property="endTime"/>
	    <result column="update_user_id" property="updateUserId"/>
	    <result column="update_time" property="updateTime"/>
	    <result column="station_id" property="stationId"/>
	</resultMap>

	<!-- sys_system_running_time table all fields -->
	<sql id="Base_Column_List">
		id,type,start_time,end_time,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="type!=null ">and t.type = #{type}</if>
		<if test="startTime!=null ">and t.start_time = #{startTime}</if>
		<if test="endTime!=null ">and t.end_time = #{endTime}</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_system_running_time t
	<include refid="Example_Where_Clause"/>
	</select>

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