select if(count(1)=0,0,1) from sys_auth where auth_source=#{authSource} and auth_target=#{authTarget}
</select>
<selectid="findAuthId"resultType="String">
select id from sys_auth where auth_source=#{authSource} and auth_source_type=#{authSourceType} and auth_target=#{authTarget} and auth_target_type=#{authTargetType} limit 1