<?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.liresource.dao.LiResourcePointsDao">
	<!-- Result Map -->
	<resultMap id="BaseResultMap" type="com.devplatform.admin.modules.liresource.bean.LiResourcePoints">
	    <result column="id" property="id"/>
	    <result column="resource_id" property="resourceId"/>
	    <result column="type" property="type"/>
	    <result column="address_ip" property="addressIp"/>
	    <result column="name" property="name"/>
	    <result column="slave_id" property="slaveId"/>
	    <result column="function_code_type" property="functionCodeType"/>
	    <result column="data_type" property="dataType"/>
	    <result column="register_address" property="registerAddress"/>
	    <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="deleted" property="deleted"/>
	    <result column="sys_sign" property="sysSign"/>
	    <result column="station_id" property="stationId"/>
	    <result column="byx1" property="byx1"/>
	    <result column="byx2" property="byx2"/>
	    <result column="byx3" property="byx3"/>
	</resultMap>

	<!-- li_resource_points table all fields -->
	<sql id="Base_Column_List">
		id,resource_id,type,address_ip,name,slave_id,function_code_type,data_type,register_address,create_user_id,create_time,update_user_id,update_time,deleted,sys_sign,station_id,byx1,byx2,byx3
	</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="type!=null ">and t.type = #{type}</if>
		<if test="addressIp!=null and addressIp!=''">and t.address_ip = #{addressIp}</if>
		<if test="name!=null and name!=''">and t.name = #{name}</if>
		<if test="slaveId!=null ">and t.slave_id = #{slaveId}</if>
		<if test="functionCodeType!=null ">and t.function_code_type = #{functionCodeType}</if>
		<if test="dataType!=null ">and t.data_type = #{dataType}</if>
		<if test="registerAddress!=null ">and t.register_address = #{registerAddress}</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="deleted!=null ">and t.deleted = #{deleted}</if>
		<if test="sysSign!=null and sysSign!=''">and t.sys_sign = #{sysSign}</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>
	</sql>

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

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


