<?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.xjrsoft.module.student.mapper.CadreDeptMapper">
    <select id="getCadreDeptTree" parameterType="com.xjrsoft.module.student.dto.CadreDeptTreeDto"
            resultType="com.xjrsoft.module.student.vo.CadreDeptTreeVo">
        SELECT
            t.*,
            t1.name AS instructorUserIdCN
        FROM cadre_dept t
                 LEFT JOIN xjr_user t1 ON (t1.id = t.instructor_user_id)
        WHERE t.delete_mark = 0
        ORDER BY t.id DESC
    </select>
</mapper>