<?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.zsc.edu.gateway.modules.system.repo.DeptRepository">

    <resultMap id="deptMap" type="com.zsc.edu.gateway.modules.system.entity.Dept">
        <id column="id" property="id"/>
        <result column="sub_count" property="subCount"/>
        <result column="pid" property="pid"/>
        <result column="name" property="name"/>
        <result column="dept_sort" property="deptSort"/>
        <result column="remark" property="remark"/>
    </resultMap>

    <select id="selectDeptTree" resultMap="deptMap">
        SELECT *
        FROM sys_dept
    </select>
</mapper>
