<?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.ssm.manage.mapper.RlMenuPowerMapper">

    <resultMap id="BaseResultMap" type="com.ssm.manage.entity.RlMenuPower">
        <result property="type" column="type"/>
        <result property="parentId" column="parent_id"/>
        <result property="powerName" column="power_name"/>
        <result property="id" column="id"/>
        <result property="state" column="state"/>
    </resultMap>

    <sql id="Base_Column_List">
        type
        , parent_id, power_name, id, state
    </sql>

    <select id="queryAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"></include>
        from rl_menu_power
        <where>
            <if test="type != null">
                and type = #{type}
            </if>
            <if test="parentId != null">
                and parent_id = #{parentId}
            </if>
            <if test="powerName != null and powerName != ''">
                and power_name = #{powerName}
            </if>
            <if test="id != null">
                and id = #{id}
            </if>
            <if test="state != null">
                and state = #{state}
            </if>
        </where>
    </select>


</mapper>
