|
|
@@ -20,10 +20,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="companyName" column="company_name" />
|
|
|
+ <result property="maxDuration" column="max_duration" />
|
|
|
</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.company_id,d.company_name,d.max_duration
|
|
|
from sys_dept d
|
|
|
</sql>
|
|
|
|
|
|
@@ -42,6 +46,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="status != null and status != ''">
|
|
|
AND status = #{status}
|
|
|
</if>
|
|
|
+ <if test="companyName != null and companyName != ''">
|
|
|
+ AND company_name like concat('%', #{companyName}, '%')
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="startTime != null and endTime !=null">
|
|
|
+ AND create_time bentween #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
<if test="ancestors !=null">
|
|
|
and (dept_id= #{ancestors} or find_in_set(#{ancestors},ancestors))
|
|
|
</if>
|
|
|
@@ -103,6 +114,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="status != null">status,</if>
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
<if test="maxDuration != null ">max_duration,</if>
|
|
|
+ <if test="companyId != null ">company_id,</if>
|
|
|
+ <if test="companyName != null ">company_name,</if>
|
|
|
create_time
|
|
|
)values(
|
|
|
<if test="deptId != null and deptId != 0">#{deptId},</if>
|
|
|
@@ -116,6 +129,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="status != null">#{status},</if>
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
<if test="maxDuration != null ">#{maxDuration},</if>
|
|
|
+ <if test="companyId != null ">#{companyId},</if>
|
|
|
+ <if test="companyName != null ">#{companyName},</if>
|
|
|
sysdate()
|
|
|
)
|
|
|
</insert>
|
|
|
@@ -133,6 +148,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
<if test="maxDuration != null ">max_duration = #{maxDuration},</if>
|
|
|
+ <if test="companyId != null ">company_id = #{companyId},</if>
|
|
|
+ <if test="companyName != null ">company_name = #{companyName},</if>
|
|
|
update_time = sysdate()
|
|
|
</set>
|
|
|
where dept_id = #{deptId}
|