xiangpei
2024-04-10 e7e9f6b33432d8a312a6b8cf0164fa095492d0fa
ycl-server/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -9,6 +9,7 @@
      <result property="parentId"   column="parent_id"   />
      <result property="ancestors"  column="ancestors"   />
      <result property="deptName"   column="dept_name"   />
      <result property="area"   column="area"   />
      <result property="orderNum"   column="order_num"   />
      <result property="leader"     column="leader"      />
      <result property="phone"      column="phone"       />
@@ -23,7 +24,7 @@
   </resultMap>
   
   <sql id="selectDeptVo">
        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,d.area
        from sys_dept d
    </sql>
    
@@ -59,7 +60,7 @@
   </select>
    
    <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
      select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,
      select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.area,
         (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
      from sys_dept d
      where d.dept_id = #{deptId}
@@ -120,6 +121,7 @@
       <set>
          <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
          <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
          <if test="area != null and area != ''">area = #{area},</if>
          <if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
          <if test="orderNum != null">order_num = #{orderNum},</if>
          <if test="leader != null">leader = #{leader},</if>