<?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.RlRolePowerMapper">

    <resultMap id="BaseResultMap" type="com.ssm.manage.entity.RlRolePower">
        <result property="roleId" column="role_id"/>
        <result property="powerId" column="power_id"/>
    </resultMap>

    <sql id="Base_Column_List">
        role_id
        , power_id
    </sql>

    <select id="queryAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"></include>
        from rl_role_power
        <where>
            <if test="roleId != null">
                and role_id = #{roleId}
            </if>
            <if test="powerId != null">
                and power_id = #{powerId}
            </if>
        </where>
    </select>


</mapper>
