|
@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="email" column="email" />
|
|
|
<result property="status" column="status" />
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
+ <result property="tenantId" column="tenant_id" />
|
|
|
<result property="parentName" column="parent_name" />
|
|
|
<result property="createBy" column="create_by" />
|
|
|
<result property="createTime" column="create_time" />
|
|
@@ -23,7 +24,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.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.tenant_id, d.create_by, d.create_time
|
|
|
from sys_dept d
|
|
|
</sql>
|
|
|
|
|
@@ -59,7 +60,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.order_num, d.leader, d.phone, d.email, d.status, d.tenant_id,
|
|
|
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
|
|
|
from sys_dept d
|
|
|
where d.dept_id = #{deptId}
|
|
@@ -98,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="phone != null and phone != ''">phone,</if>
|
|
|
<if test="email != null and email != ''">email,</if>
|
|
|
<if test="status != null">status,</if>
|
|
|
+ <if test="tenantId != null">tenant_id,</if>
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
create_time
|
|
|
)values(
|
|
@@ -110,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="phone != null and phone != ''">#{phone},</if>
|
|
|
<if test="email != null and email != ''">#{email},</if>
|
|
|
<if test="status != null">#{status},</if>
|
|
|
+ <if test="tenantId != null">#{tenantId},</if>
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
sysdate()
|
|
|
)
|