<?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="io.renren.modules.app.dao.SysdocDao">

	<!-- 可根据自己的需求，是否要使用 -->
	<resultMap type="io.renren.modules.app.entity.SysdocEntity" id="sysdocMap">
		<result property="dnglid" column="dnglid" />
		<result property="name" column="name" />
		<result property="path" column="path" />
		<result property="type" column="type" />
		<result property="groupid" column="groupid" />
		<result property="beizhu" column="beizhu" />
		<result property="createtime" column="createtime" />
	</resultMap>

	<select id="queryByPage" parameterType="io.renren.modules.app.entity.SysdocEntity" resultType="io.renren.modules.app.entity.SysdocEntity">
		select * from sysdoc where 1=1
		<if test=" dnglid!=null and dnglid!='' ">
			and id like CONCAT(#{id},"%")
		</if>
		<if test=" name!=null and name!='' ">
			and name like CONCAT(#{name},"%")
		</if>
		<if test=" path!=null and path!='' ">
			and path like CONCAT(#{path},"%")
		</if>
		<if test=" type!=null and type!='' ">
			and type like CONCAT(#{type},"%")
		</if>
		<if test=" groupid!=null and groupid!='' ">
			and groupid like CONCAT(#{groupid},"%")
		</if>
		<if test=" beizhu!=null and beizhu!='' ">
			and beizhu like CONCAT(#{beizhu},"%")
		</if>
		<if test=" kstime !=null and kstime !='' ">
		<![CDATA[
		and createtime >=#{kstime}
		]]>
		</if>
		<if test=" jstime !=null and jstime !='' ">
		<![CDATA[
		and createtime <= #{jstime}
		]]>
		</if>
	</select>

</mapper>