<?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="io.dataease.base.mapper.ext.ExtOrganizationMapper">

    <select id="checkSourceRole" resultType="Integer">
        select count(id)
          from user_role ur
         where ur.user_id = #{userId}
           and ur.source_id = #{sourceId}
           and ur.role_id = #{roleId}
    </select>

</mapper>
