<?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.zsc.edu.gateway.modules.system.repo.AuthorityRepository">
    
    <select id="selectAuthoritiesByRoleId" resultType="authority">
        select sa.* from sys_authority sa
        left join sys_role_authorities ra on sa.id=ra.authority_id
        where ra.role_id=#{roleId}
    </select>

    <select id="getAuthorityIdByName" resultType="java.lang.Long">
        select sa.id from sys_authority sa where sa.name=#{authName}
    </select>

</mapper>