|
|
@ -1,41 +1,41 @@ |
|
|
|
<?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"> |
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
|
<mapper namespace="com.kms.system.mapper.SysDeptMapper"> |
|
|
|
|
|
|
|
<resultMap type="com.shuili.common.core.domain.entity.SysDept" id="SysDeptResult"> |
|
|
|
<id property="id" column="id" /> |
|
|
|
<result property="parentId" column="parent_id" /> |
|
|
|
<result property="ancestors" column="ancestors" /> |
|
|
|
<result property="deptName" column="dept_name" /> |
|
|
|
<result property="orderNum" column="order_num" /> |
|
|
|
<result property="leader" column="leader" /> |
|
|
|
<result property="phone" column="phone" /> |
|
|
|
<result property="email" column="email" /> |
|
|
|
<result property="status" column="status" /> |
|
|
|
<result property="tag" column="tag" /> |
|
|
|
<result property="delFlag" column="del_flag" /> |
|
|
|
<result property="parentName" column="parent_name" /> |
|
|
|
<result property="createUid" column="create_uid" /> |
|
|
|
<result property="createTime" column="create_time" /> |
|
|
|
<result property="updateUid" column="update_uid" /> |
|
|
|
<result property="updateTime" column="update_time" /> |
|
|
|
<result property="name" column="name" /> |
|
|
|
<result property="pcLogo" column="pc_logo" /> |
|
|
|
<result property="pcBackground" column="pc_background" /> |
|
|
|
<result property="adminName" column="admin_name" /> |
|
|
|
<result property="adminLogo" column="admin_logo" /> |
|
|
|
<result property="isDownload" column="is_download" /> |
|
|
|
<result property="isComment" column="is_comment" /> |
|
|
|
<result property="ipStart" column="ip_start" /> |
|
|
|
<result property="ipEnd" column="ip_end" /> |
|
|
|
<result property="dataType" column="data_type" /> |
|
|
|
<result property="beginDate" column="begin_date" /> |
|
|
|
<result property="endDate" column="end_date" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectDeptVo"> |
|
|
|
<resultMap type="com.shuili.common.core.domain.entity.SysDept" id="SysDeptResult"> |
|
|
|
<id property="id" column="id"/> |
|
|
|
<result property="parentId" column="parent_id"/> |
|
|
|
<result property="ancestors" column="ancestors"/> |
|
|
|
<result property="deptName" column="dept_name"/> |
|
|
|
<result property="orderNum" column="order_num"/> |
|
|
|
<result property="leader" column="leader"/> |
|
|
|
<result property="phone" column="phone"/> |
|
|
|
<result property="email" column="email"/> |
|
|
|
<result property="status" column="status"/> |
|
|
|
<result property="tag" column="tag"/> |
|
|
|
<result property="delFlag" column="del_flag"/> |
|
|
|
<result property="parentName" column="parent_name"/> |
|
|
|
<result property="createUid" column="create_uid"/> |
|
|
|
<result property="createTime" column="create_time"/> |
|
|
|
<result property="updateUid" column="update_uid"/> |
|
|
|
<result property="updateTime" column="update_time"/> |
|
|
|
<result property="name" column="name"/> |
|
|
|
<result property="pcLogo" column="pc_logo"/> |
|
|
|
<result property="pcBackground" column="pc_background"/> |
|
|
|
<result property="adminName" column="admin_name"/> |
|
|
|
<result property="adminLogo" column="admin_logo"/> |
|
|
|
<result property="isDownload" column="is_download"/> |
|
|
|
<result property="isComment" column="is_comment"/> |
|
|
|
<result property="ipStart" column="ip_start"/> |
|
|
|
<result property="ipEnd" column="ip_end"/> |
|
|
|
<result property="dataType" column="data_type"/> |
|
|
|
<result property="beginDate" column="begin_date"/> |
|
|
|
<result property="endDate" column="end_date"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectDeptVo"> |
|
|
|
select d.id,d.ip_start,d.ip_end,d.is_download,d.is_comment, d.parent_id, d.ancestors, |
|
|
|
d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.tag, |
|
|
|
d.del_flag, d.create_uid, d.create_time, d.name, d.pc_logo, d.pc_background, |
|
|
@ -43,171 +43,173 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
from sys_dept d |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectDeptList" parameterType="com.shuili.common.core.domain.entity.SysDept" resultMap="SysDeptResult"> |
|
|
|
<select id="selectDeptList" parameterType="com.shuili.common.core.domain.entity.SysDept" resultMap="SysDeptResult"> |
|
|
|
<include refid="selectDeptVo"/> |
|
|
|
where d.del_flag = '0' |
|
|
|
<if test="parentId != null and parentId != ''"> |
|
|
|
AND parent_id = #{parentId} |
|
|
|
</if> |
|
|
|
<if test="deptName != null and deptName != ''"> |
|
|
|
AND dept_name like concat('%', #{deptName}, '%') |
|
|
|
</if> |
|
|
|
<if test="searchValue != null and searchValue != ''"> |
|
|
|
AND dept_name =#{searchValue} |
|
|
|
</if> |
|
|
|
<if test="status != null and status != ''"> |
|
|
|
AND status = #{status} |
|
|
|
</if> |
|
|
|
<!-- 数据范围过滤 --> |
|
|
|
${params.dataScope} |
|
|
|
order by d.parent_id, d.order_num |
|
|
|
AND parent_id = #{parentId} |
|
|
|
</if> |
|
|
|
<if test="deptName != null and deptName != ''"> |
|
|
|
AND dept_name like concat('%', #{deptName}, '%') |
|
|
|
</if> |
|
|
|
<if test="searchValue != null and searchValue != ''"> |
|
|
|
AND dept_name =#{searchValue} |
|
|
|
</if> |
|
|
|
<if test="status != null and status != ''"> |
|
|
|
AND status = #{status} |
|
|
|
</if> |
|
|
|
<!-- 数据范围过滤 --> |
|
|
|
${params.dataScope} |
|
|
|
order by d.parent_id, d.order_num |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectDeptListByRoleId" parameterType="String" resultType="Integer"> |
|
|
|
select d.id, d.parent_id |
|
|
|
from sys_dept d |
|
|
|
left join sys_role_dept rd on d.id = rd.dept_id |
|
|
|
select d.id, d.parent_id |
|
|
|
from sys_dept d |
|
|
|
left join sys_role_dept rd on d.id = rd.dept_id |
|
|
|
where rd.role_id = #{roleId} |
|
|
|
and d.id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.id = rd.dept_id and rd.role_id = #{roleId}) |
|
|
|
order by d.parent_id, d.order_num |
|
|
|
</select> |
|
|
|
and d.id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.id = rd.dept_id and |
|
|
|
rd.role_id = #{roleId}) |
|
|
|
order by d.parent_id, d.order_num |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectDeptById" parameterType="String" resultMap="SysDeptResult"> |
|
|
|
<include refid="selectDeptVo"/> |
|
|
|
where id = #{id} |
|
|
|
</select> |
|
|
|
<include refid="selectDeptVo"/> |
|
|
|
where id = #{id} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="checkDeptExistUser" parameterType="String" resultType="int"> |
|
|
|
select count(1) from sys_user where id = #{id} and del_flag = '0' |
|
|
|
</select> |
|
|
|
select count(1) from sys_user where id = #{id} and del_flag = '0' |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="hasChildByDeptId" parameterType="String" resultType="int"> |
|
|
|
select count(1) from sys_dept |
|
|
|
where del_flag = '0' and parent_id = #{id} limit 1 |
|
|
|
</select> |
|
|
|
<select id="hasChildByDeptId" parameterType="String" resultType="int"> |
|
|
|
select count(1) from sys_dept |
|
|
|
where del_flag = '0' and parent_id = #{id} limit 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectChildrenDeptById" parameterType="String" resultMap="SysDeptResult"> |
|
|
|
select * from sys_dept where find_in_set(#{id}, ancestors) |
|
|
|
</select> |
|
|
|
<select id="selectChildrenDeptById" parameterType="String" resultMap="SysDeptResult"> |
|
|
|
select * from sys_dept where find_in_set(#{id}, ancestors) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectNormalChildrenDeptById" parameterType="String" resultType="int"> |
|
|
|
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{id}, ancestors) |
|
|
|
</select> |
|
|
|
<select id="selectNormalChildrenDeptById" parameterType="String" resultType="int"> |
|
|
|
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{id}, ancestors) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="checkDeptNameUnique" resultMap="SysDeptResult"> |
|
|
|
<include refid="selectDeptVo"/> |
|
|
|
where dept_name=#{deptName} and parent_id = #{parentId} limit 1 |
|
|
|
</select> |
|
|
|
<select id="checkDeptNameUnique" resultMap="SysDeptResult"> |
|
|
|
<include refid="selectDeptVo"/> |
|
|
|
where dept_name=#{deptName} and parent_id = #{parentId} limit 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertDept" parameterType="com.shuili.common.core.domain.entity.SysDept"> |
|
|
|
insert into sys_dept( |
|
|
|
<if test="id != null and id != ''">id,</if> |
|
|
|
<if test="dataType != null and id != ''">data_type,</if> |
|
|
|
<if test="beginDate != null and id != ''">begin_date,</if> |
|
|
|
<if test="endDate != null and id != ''">end_date,</if> |
|
|
|
<if test="ipEnd != null and ipEnd != ''">ip_end,</if> |
|
|
|
<if test="ipStart != null and ipStart != ''">ip_start,</if> |
|
|
|
<if test="isComment != null and isComment != ''">is_comment,</if> |
|
|
|
<if test="isDownload != null and isDownload != ''">is_download,</if> |
|
|
|
<if test="parentId != null and parentId != ''">parent_id,</if> |
|
|
|
<if test="deptName != null and deptName != ''">dept_name,</if> |
|
|
|
<if test="ancestors != null and ancestors != ''">ancestors,</if> |
|
|
|
<if test="orderNum != null and orderNum != ''">order_num,</if> |
|
|
|
<if test="leader != null and leader != ''">leader,</if> |
|
|
|
<if test="phone != null and phone != ''">phone,</if> |
|
|
|
<if test="email != null and email != ''">email,</if> |
|
|
|
<if test="status != null">status,</if> |
|
|
|
<if test="tag != null">tag,</if> |
|
|
|
<if test="createUid != null and createUid != ''">create_uid,</if> |
|
|
|
<if test="name != null and name != ''">name,</if> |
|
|
|
<if test="pcLogo != null and pcLogo != ''">pc_logo,</if> |
|
|
|
<if test="pcBackground != null and pcBackground != ''">pc_background,</if> |
|
|
|
<if test="adminName != null and adminName != ''">admin_name,</if> |
|
|
|
<if test="adminLogo != null and adminLogo != ''">admin_logo,</if> |
|
|
|
<if test="xzqhId != null and adminLogo != ''">xzqh_id,</if> |
|
|
|
create_time |
|
|
|
)values( |
|
|
|
<if test="id != null and id != ''">#{id},</if> |
|
|
|
<if test="dataType != null and id != ''">#{dataType},</if> |
|
|
|
<if test="beginDate != null and id != ''">#{beginDate},</if> |
|
|
|
<if test="endDate != null and id != ''">#{endDate},</if> |
|
|
|
<if test="ipEnd != null and ipEnd != ''">#{ipEnd},</if> |
|
|
|
<if test="ipStart != null and ipStart != ''">#{ipStart},</if> |
|
|
|
<if test="isComment != null and isComment != ''">#{isComment},</if> |
|
|
|
<if test="isDownload != null and isDownload != ''">#{isDownload},</if> |
|
|
|
<if test="parentId != null and parentId != ''">#{parentId},</if> |
|
|
|
<if test="deptName != null and deptName != ''">#{deptName},</if> |
|
|
|
<if test="ancestors != null and ancestors != ''">#{ancestors},</if> |
|
|
|
<if test="orderNum != null and orderNum != ''">#{orderNum},</if> |
|
|
|
<if test="leader != null and leader != ''">#{leader},</if> |
|
|
|
<if test="phone != null and phone != ''">#{phone},</if> |
|
|
|
<if test="email != null and email != ''">#{email},</if> |
|
|
|
<if test="status != null">#{status},</if> |
|
|
|
<if test="tag != null">#{tag},</if> |
|
|
|
<if test="createUid != null and createUid != ''">#{createUid},</if> |
|
|
|
<if test="name != null and name != ''">#{name},</if> |
|
|
|
<if test="pcLogo != null and pcLogo != ''">#{pcLogo},</if> |
|
|
|
<if test="pcBackground != null and pcBackground != ''">#{pcBackground},</if> |
|
|
|
<if test="adminName != null and adminName != ''">#{adminName},</if> |
|
|
|
<if test="adminLogo != null and adminLogo != ''">#{adminLogo},</if> |
|
|
|
<if test="xzqhId != null and adminLogo != ''">#{xzqhId},</if> |
|
|
|
sysdate() |
|
|
|
) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="updateDept" parameterType="com.shuili.common.core.domain.entity.SysDept"> |
|
|
|
update sys_dept |
|
|
|
<set> |
|
|
|
<if test="parentId != null and parentId != ''">parent_id = #{parentId},</if> |
|
|
|
data_type = #{dataType},begin_date = #{beginDate},end_date = #{endDate}, |
|
|
|
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if> |
|
|
|
<if test="isComment != null and isComment != ''">is_comment = #{isComment},</if> |
|
|
|
<if test="isDownload != null and isDownload != ''">is_download = #{isDownload},</if> |
|
|
|
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if> |
|
|
|
<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if> |
|
|
|
<if test="leader != null">leader = #{leader},</if> |
|
|
|
<if test="phone != null">phone = #{phone},</if> |
|
|
|
<if test="email != null">email = #{email},</if> |
|
|
|
<if test="status != null and status != ''">status = #{status},</if> |
|
|
|
<if test="tag != null and tag != ''">tag = #{tag},</if> |
|
|
|
<if test="updateUid != null and updateUid != ''">update_uid = #{updateUid},</if> |
|
|
|
<if test="name != null and name != ''">name = #{name},</if> |
|
|
|
<if test="pcLogo != null and pcLogo != ''">pc_logo = #{pcLogo},</if> |
|
|
|
<if test="pcBackground != null and pcBackground != ''">pc_background = #{pcBackground},</if> |
|
|
|
<if test="adminName != null and adminName != ''">admin_name = #{adminName},</if> |
|
|
|
<if test="adminLogo != null and adminLogo != ''">admin_logo = #{adminLogo},</if> |
|
|
|
<if test="ipEnd != null and ipEnd != ''">ip_end = #{ipEnd},</if> |
|
|
|
<if test="ipStart != null and ipStart != ''">ip_start = #{ipStart},</if> |
|
|
|
update_time = sysdate() |
|
|
|
</set> |
|
|
|
where id = #{id} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateDeptChildren" parameterType="java.util.List"> |
|
|
|
update sys_dept set ancestors = |
|
|
|
<foreach collection="depts" item="item" index="index" |
|
|
|
separator=" " open="case id" close="end"> |
|
|
|
when #{item.id} then #{item.ancestors} |
|
|
|
</foreach> |
|
|
|
where id in |
|
|
|
<foreach collection="depts" item="item" index="index" |
|
|
|
separator="," open="(" close=")"> |
|
|
|
#{item.id} |
|
|
|
</foreach> |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateDeptStatus" parameterType="com.shuili.common.core.domain.entity.SysDept"> |
|
|
|
update sys_dept a |
|
|
|
<set> |
|
|
|
<if test="status != null and status != ''">a.status = #{status},</if> |
|
|
|
<if test="updateUid != null and updateUid != ''">a.update_uid = #{updateUid},</if> |
|
|
|
a.update_time = sysdate() |
|
|
|
insert into sys_dept( |
|
|
|
<if test="id != null and id != ''">id,</if> |
|
|
|
<if test="dataType != null and id != ''">data_type,</if> |
|
|
|
<if test="beginDate != null and id != ''">begin_date,</if> |
|
|
|
<if test="endDate != null and id != ''">end_date,</if> |
|
|
|
<if test="ipEnd != null and ipEnd != ''">ip_end,</if> |
|
|
|
<if test="ipStart != null and ipStart != ''">ip_start,</if> |
|
|
|
<if test="isComment != null and isComment != ''">is_comment,</if> |
|
|
|
<if test="isDownload != null and isDownload != ''">is_download,</if> |
|
|
|
<if test="parentId != null and parentId != ''">parent_id,</if> |
|
|
|
<if test="deptName != null and deptName != ''">dept_name,</if> |
|
|
|
<if test="ancestors != null and ancestors != ''">ancestors,</if> |
|
|
|
<if test="orderNum != null and orderNum != ''">order_num,</if> |
|
|
|
<if test="leader != null and leader != ''">leader,</if> |
|
|
|
<if test="phone != null and phone != ''">phone,</if> |
|
|
|
<if test="email != null and email != ''">email,</if> |
|
|
|
<if test="status != null">status,</if> |
|
|
|
<if test="tag != null">tag,</if> |
|
|
|
<if test="createUid != null and createUid != ''">create_uid,</if> |
|
|
|
<if test="name != null and name != ''">name,</if> |
|
|
|
<if test="pcLogo != null and pcLogo != ''">pc_logo,</if> |
|
|
|
<if test="pcBackground != null and pcBackground != ''">pc_background,</if> |
|
|
|
<if test="adminName != null and adminName != ''">admin_name,</if> |
|
|
|
<if test="adminLogo != null and adminLogo != ''">admin_logo,</if> |
|
|
|
<if test="xzqhId != null and adminLogo != ''">xzqh_id,</if> |
|
|
|
create_time |
|
|
|
)values( |
|
|
|
<if test="id != null and id != ''">#{id},</if> |
|
|
|
<if test="dataType != null and id != ''">#{dataType},</if> |
|
|
|
<if test="beginDate != null and id != ''">#{beginDate},</if> |
|
|
|
<if test="endDate != null and id != ''">#{endDate},</if> |
|
|
|
<if test="ipEnd != null and ipEnd != ''">#{ipEnd},</if> |
|
|
|
<if test="ipStart != null and ipStart != ''">#{ipStart},</if> |
|
|
|
<if test="isComment != null and isComment != ''">#{isComment},</if> |
|
|
|
<if test="isDownload != null and isDownload != ''">#{isDownload},</if> |
|
|
|
<if test="parentId != null and parentId != ''">#{parentId},</if> |
|
|
|
<if test="deptName != null and deptName != ''">#{deptName},</if> |
|
|
|
<if test="ancestors != null and ancestors != ''">#{ancestors},</if> |
|
|
|
<if test="orderNum != null and orderNum != ''">#{orderNum},</if> |
|
|
|
<if test="leader != null and leader != ''">#{leader},</if> |
|
|
|
<if test="phone != null and phone != ''">#{phone},</if> |
|
|
|
<if test="email != null and email != ''">#{email},</if> |
|
|
|
<if test="status != null">#{status},</if> |
|
|
|
<if test="tag != null">#{tag},</if> |
|
|
|
<if test="createUid != null and createUid != ''">#{createUid},</if> |
|
|
|
<if test="name != null and name != ''">#{name},</if> |
|
|
|
<if test="pcLogo != null and pcLogo != ''">#{pcLogo},</if> |
|
|
|
<if test="pcBackground != null and pcBackground != ''">#{pcBackground},</if> |
|
|
|
<if test="adminName != null and adminName != ''">#{adminName},</if> |
|
|
|
<if test="adminLogo != null and adminLogo != ''">#{adminLogo},</if> |
|
|
|
<if test="xzqhId != null and adminLogo != ''">#{xzqhId},</if> |
|
|
|
sysdate() |
|
|
|
) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="updateDept" parameterType="com.shuili.common.core.domain.entity.SysDept"> |
|
|
|
update sys_dept |
|
|
|
<set> |
|
|
|
<if test="parentId != null and parentId != ''">parent_id = #{parentId},</if> |
|
|
|
data_type = #{dataType},begin_date = #{beginDate},end_date = #{endDate}, |
|
|
|
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if> |
|
|
|
<if test="isComment != null and isComment != ''">is_comment = #{isComment},</if> |
|
|
|
<if test="xzqhId != null and xzqhId != ''">xzqh_id = #{xzqhId},</if> |
|
|
|
<if test="isDownload != null and isDownload != ''">is_download = #{isDownload},</if> |
|
|
|
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if> |
|
|
|
<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if> |
|
|
|
<if test="leader != null">leader = #{leader},</if> |
|
|
|
<if test="phone != null">phone = #{phone},</if> |
|
|
|
<if test="email != null">email = #{email},</if> |
|
|
|
<if test="status != null and status != ''">status = #{status},</if> |
|
|
|
<if test="tag != null and tag != ''">tag = #{tag},</if> |
|
|
|
<if test="updateUid != null and updateUid != ''">update_uid = #{updateUid},</if> |
|
|
|
<if test="name != null and name != ''">name = #{name},</if> |
|
|
|
<if test="pcLogo != null and pcLogo != ''">pc_logo = #{pcLogo},</if> |
|
|
|
<if test="pcBackground != null and pcBackground != ''">pc_background = #{pcBackground},</if> |
|
|
|
<if test="adminName != null and adminName != ''">admin_name = #{adminName},</if> |
|
|
|
<if test="adminLogo != null and adminLogo != ''">admin_logo = #{adminLogo},</if> |
|
|
|
<if test="ipEnd != null and ipEnd != ''">ip_end = #{ipEnd},</if> |
|
|
|
<if test="ipStart != null and ipStart != ''">ip_start = #{ipStart},</if> |
|
|
|
update_time = sysdate() |
|
|
|
</set> |
|
|
|
where id = #{id} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateDeptChildren" parameterType="java.util.List"> |
|
|
|
update sys_dept set ancestors = |
|
|
|
<foreach collection="depts" item="item" index="index" |
|
|
|
separator=" " open="case id" close="end"> |
|
|
|
when #{item.id} then #{item.ancestors} |
|
|
|
</foreach> |
|
|
|
where id in |
|
|
|
<foreach collection="depts" item="item" index="index" |
|
|
|
separator="," open="(" close=")"> |
|
|
|
#{item.id} |
|
|
|
</foreach> |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateDeptStatus" parameterType="com.shuili.common.core.domain.entity.SysDept"> |
|
|
|
update sys_dept a |
|
|
|
<set> |
|
|
|
<if test="status != null and status != ''">a.status = #{status},</if> |
|
|
|
<if test="updateUid != null and updateUid != ''">a.update_uid = #{updateUid},</if> |
|
|
|
a.update_time = sysdate() |
|
|
|
</set> |
|
|
|
where FIND_IN_SET(a.id,#{ancestors}) |
|
|
|
</update> |
|
|
|
where FIND_IN_SET(a.id,#{ancestors}) |
|
|
|
</update> |
|
|
|
|
|
|
|
<delete id="deleteDeptById" parameterType="String"> |
|
|
|
delete from sys_dept where id = #{id} |
|
|
|
</delete> |
|
|
|
<delete id="deleteDeptById" parameterType="String"> |
|
|
|
delete from sys_dept where id = #{id} |
|
|
|
</delete> |
|
|
|
|
|
|
|
</mapper> |
|
|
|