From 4de9fa33b7261081a47d8b3bc4ae437a026c9716 Mon Sep 17 00:00:00 2001 From: AprilWind <2100166581@qq.com> Date: Tue, 7 Jan 2025 05:23:27 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E4=BF=A1=E6=81=AF=E5=A2=9E=E5=8A=A0=E4=BA=8B?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/dromara/system/service/impl/SysDeptServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java index 0199ec719..ca062bee6 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java @@ -31,6 +31,7 @@ import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Caching; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Arrays; @@ -301,6 +302,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService { @CacheEvict(cacheNames = CacheNames.SYS_DEPT_AND_CHILD, allEntries = true) }) @Override + @Transactional(rollbackFor = Exception.class) public int updateDept(SysDeptBo bo) { SysDept dept = MapstructUtils.convert(bo, SysDept.class); SysDept oldDept = baseMapper.selectById(dept.getDeptId());