From 808cda3277305f3f7d56ef703ea7f58bbdaf39d5 Mon Sep 17 00:00:00 2001 From: Ants Date: Fri, 23 Sep 2022 07:00:25 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!8=20:?= =?UTF-8?q?=20=E5=A4=84=E7=90=86iss=20=E4=BC=98=E5=8C=96=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/organization/department/edit.vue | 6 ------ .../impl/SystemAuthDeptServiceImpl.java | 4 ---- .../mapper/system/SystemAuthDeptMapper.java | 19 ------------------- 3 files changed, 29 deletions(-) diff --git a/admin/src/views/organization/department/edit.vue b/admin/src/views/organization/department/edit.vue index 3dec91d1..70b5e584 100644 --- a/admin/src/views/organization/department/edit.vue +++ b/admin/src/views/organization/department/edit.vue @@ -125,12 +125,6 @@ const { optionsData } = useDictOptions<{ } }) -watch(optionsData, (arr) => { - if (arr.dept) { - formData.pid = arr.dept[0].id - } -}) - const handleSubmit = async () => { await formRef.value?.validate() mode.value == 'edit' ? await deptEdit(formData) : await deptAdd(formData) diff --git a/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java b/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java index 33f9c1dc..b9afdde1 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java +++ b/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java @@ -14,7 +14,6 @@ import com.mdd.common.utils.ArrayUtil; import com.mdd.common.utils.TimeUtil; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.*; @@ -160,7 +159,6 @@ class SystemAuthDeptServiceImpl implements ISystemAuthDeptService { * @author fzr * @param systemAuthDeptParam 参数 */ - @Transactional(rollbackFor = Exception.class) @Override public void edit(SystemAuthDeptParam systemAuthDeptParam) { SystemAuthDept model = systemAuthDeptMapper.selectOne( @@ -184,8 +182,6 @@ class SystemAuthDeptServiceImpl implements ISystemAuthDeptService { model.setIsStop(systemAuthDeptParam.getIsStop()); model.setUpdateTime(System.currentTimeMillis() / 1000); systemAuthDeptMapper.updateById(model); - //级联更新自己状态 - systemAuthDeptMapper.updateChilder(systemAuthDeptParam.getIsStop(),model.getId()); } /** diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java index a975ba70..68e8dcc4 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java @@ -3,29 +3,10 @@ package com.mdd.common.mapper.system; import com.mdd.common.core.basics.IBaseMapper; import com.mdd.common.entity.system.SystemAuthDept; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Update; /** * 系统岗位Mapper */ @Mapper public interface SystemAuthDeptMapper extends IBaseMapper { - - /** - * 级联更新部门状态 - * @param stopStatus - * @param id - * @return - */ - @Update(value = "WITH recursive temp AS (SELECT id, pid\n" - + " FROM la_system_auth_dept\n" - + " WHERE id = #{id}\n" + " UNION ALL\n" - + " SELECT u.id, u.pid\n" - + " FROM la_system_auth_dept u,\n" - + " temp t\n" - + " WHERE u.pid = t.id and u.is_stop <> #{stopStatus})\n" - + "update la_system_auth_dept set is_stop = #{stopStatus}\n" - + "where id in (select id from temp)") - void updateChilder(@Param("stopStatus") int stopStatus, @Param("id") Integer id); }