<?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.ExtSysAuthMapper">

    <resultMap id="BaseResultMapAuthDetailDTO" type="io.dataease.dto.SysAuthDetailDTO"
               extends="io.dataease.base.mapper.SysAuthDetailMapper.BaseResultMap">
        <result column="auth_source" jdbcType="VARCHAR" property="authSource" />
        <result column="auth_source_type" jdbcType="VARCHAR" property="authSourceType" />
        <result column="auth_target" jdbcType="VARCHAR" property="authTarget" />
        <result column="auth_target_type" jdbcType="VARCHAR" property="authTargetType" />
    </resultMap>

    <select id="checkTreeNoManageCount" resultType="Boolean">
      select if(CHECK_TREE_NO_MANAGE_PRIVILEGE(#{userId},#{modelType},#{nodeId})>0,1,0)
    </select>

</mapper>
