@ -9,6 +9,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property= "parentId" column= "parent_id" />
<result property= "ancestors" column= "ancestors" />
<result property= "deptName" column= "dept_name" />
<result property= "framework" column= "framework" />
<result property= "area" column= "area" />
<result property= "orderNum" column= "order_num" />
<result property= "leader" column= "leader" />
<result property= "phone" column= "phone" />
@ -23,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</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.framework,d.area, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
from sys_dept d
</sql>
@ -72,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</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.framework,d.area, d.order_num, d.leader, d.phone, d.email, d.status,
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
from sys_dept d
where d.dept_id = #{deptId}
@ -91,6 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "deptId != null and deptId != 0" > dept_id,</if>
<if test= "parentId != null and parentId != 0" > parent_id,</if>
<if test= "deptName != null and deptName != ''" > dept_name,</if>
<if test= "framework != null and framework != ''" > framework,</if>
<if test= "area != null and area != ''" > area,</if>
<if test= "ancestors != null and ancestors != ''" > ancestors,</if>
<if test= "orderNum != null" > order_num,</if>
<if test= "leader != null and leader != ''" > leader,</if>
@ -103,6 +107,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "deptId != null and deptId != 0" > #{deptId},</if>
<if test= "parentId != null and parentId != 0" > #{parentId},</if>
<if test= "deptName != null and deptName != ''" > #{deptName},</if>
<if test= "framework != null and framework != ''" > #{framework},</if>
<if test= "area != null and area != ''" > #{area},</if>
<if test= "ancestors != null and ancestors != ''" > #{ancestors},</if>
<if test= "orderNum != null" > #{orderNum},</if>
<if test= "leader != null and leader != ''" > #{leader},</if>
@ -119,6 +125,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<set >
<if test= "parentId != null and parentId != 0" > parent_id = #{parentId},</if>
<if test= "deptName != null and deptName != ''" > dept_name = #{deptName},</if>
<if test= "framework != null and framework != ''" > framework = #{framework},</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>