<?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="cn.fateverse.admin.mapper.DeptMapper">

    <sql id="selectSql">
        select dept_id,
               parent_id,
               ancestors,
               dept_name,
               order_num,
               leader,
               leader_id,
               phone,
               email,
               state,
               del_flag,
               create_by,
               create_time,
               update_by,
               update_time
        from sys_dept
    </sql>


    <select id="selectListByDeptParentId" resultType="cn.fateverse.common.core.entity.Dept">
        <include refid="selectSql"/>
        where parent_id = #{parentId}
    </select>

</mapper>
