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

    <resultMap id="BaseResultMap" type="com.ssm.manage.entity.RlRoleStaff">
        <result property="roleId" column="role_id"/>
        <result property="staffId" column="staff_id"/>
    </resultMap>

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

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


</mapper>
