<?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.dcs.hnyz.mapper.PageControlMapper">
    
    <resultMap type="PageControl" id="PageControlResult">
        <result property="pageId"    column="page_id"    />
        <result property="pageName"    column="page_name"    />
        <result property="pageCode"    column="page_code"    />
        <result property="pageUrl"    column="page_url"    />
        <result property="status"    column="status"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="createTime"    column="create_time"    />
        <result property="createBy"    column="create_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="remark"    column="remark"    />
    </resultMap>

    <sql id="selectPageControlVo">
        select page_id, page_name, page_code, page_url, status, del_flag, create_time, create_by, update_time, update_by, remark from page_control
    </sql>

    <select id="selectPageControlList" parameterType="PageControl" resultMap="PageControlResult">
        <include refid="selectPageControlVo"/>
        <where>
            <if test="pageName != null  and pageName != ''"> and page_name like concat('%', #{pageName}, '%')</if>
            <if test="pageCode != null  and pageCode != ''"> and page_code = #{pageCode}</if>
            <if test="pageUrl != null  and pageUrl != ''"> and page_url = #{pageUrl}</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
            <if test="delFlag == null"> and del_flag = '0'</if>
        </where>
    </select>

</mapper>