<?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="cn.cecep.talroad.mapper.PcMenuMapper">

    <resultMap type="cn.cecep.talroad.domain.PcMenu" id="PcMenuResult">
        <result property="id"    column="id"    />
        <result property="menuCode"    column="menu_code"    />
        <result property="menuName"    column="menu_name"    />
        <result property="menuIfUse"    column="menu_if_use"    />
    </resultMap>


    <sql id="selectPcMenuVo">
        select id, menu_code, menu_name, menu_if_use from pc_menu
    </sql>

    <select id="selectPcMenuList" parameterType="cn.cecep.talroad.domain.PcMenu" resultMap="PcMenuResult">
        <include refid="selectPcMenuVo"/>
        <where>
            <if test="menuCode != null  and menuCode != ''"> and menu_code = #{menuCode}</if>
            <if test="menuName != null  and menuName != ''"> and menu_name like concat('%', #{menuName}, '%')</if>
            <if test="menuIfUse != null  and menuIfUse != ''"> and menu_if_use = #{menuIfUse}</if>
        </where>
    </select>

</mapper>
