<?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.lantone.security.mapper.RoleSoftwareDataAuthMapper">
    <select id="getRole" resultType="com.lantone.security.dto.GetDataAuthRoleDTO">
        SELECT
            r.id,
            r.`name`
        FROM
            sys_role r,
            sys_role_software_data_auth rsd
        WHERE
        r.`status` = '1'
        AND r.is_deleted = 'N'
        AND rsd.is_deleted = 'N'
        AND r.id = rsd.role_id
        AND rsd.software_data_auth_id = #{Id}
    </select>
</mapper>