<?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.zhentao.mapper.RolePermissionMapper">
    
    <!-- 根据角色ID查询权限ID列表 -->
    <select id="selectPermissionIdsByRoleId" resultType="java.lang.Integer">
        SELECT permission_id
        FROM admin_role_permission
        WHERE role_id = #{roleId}
    </select>
    
    <!-- 根据角色ID删除所有权限关联 -->
    <delete id="deleteByRoleId">
        DELETE FROM admin_role_permission
        WHERE role_id = #{roleId}
    </delete>
    
</mapper>

