<?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.njcn.gather.system.dictionary.mapper.DictTreeMapper">
    <select id="queryLastLevelById" resultType="com.njcn.gather.system.dictionary.pojo.vo.DictTreeVO">
        SELECT
            *
        FROM
            sys_dict_tree a
        WHERE
            a.pids LIKE concat('%',#{id},'%')
          AND NOT EXISTS (
            SELECT
                1
            FROM
                sys_dict_tree b
            WHERE
                b.pids LIKE concat('%',#{id},'%') and a.id = b.pid)
    </select>
    <select id="getPhaseAngleIds" resultType="java.lang.String">
        select id from sys_dict_tree where name like '电压相角' or name like '电流相角'
    </select>
</mapper>