From f3d1f0afe24d6856570e3f4b7a9c35013129a8b7 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 13 Dec 2022 15:09:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0=E9=94=AE?= =?UTF-8?q?=E5=90=8D=E6=97=B6=E7=A7=BB=E9=99=A4=E5=89=8D=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/system/mapper/SysDeptMapper.java | 2 +- .../main/java/com/ruoyi/system/service/ISysDeptService.java | 2 +- .../com/ruoyi/system/service/impl/SysConfigServiceImpl.java | 6 ++++++ .../com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java index b8158b359..92514f27f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java @@ -12,7 +12,7 @@ import com.ruoyi.common.core.domain.entity.SysDept; public interface SysDeptMapper { /** - * 查询部门人数 + * 查询下级部门数量 * * @param dept 部门信息 * @return 结果 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java index c03f9cdf1..fc89be61c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java @@ -45,7 +45,7 @@ public interface ISysDeptService public List roleDeptTreeData(SysRole role); /** - * 查询部门人数 + * 根据父部门ID查询下级部门数量 * * @param parentId 父部门ID * @return 结果 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java index 3a77b333f..4b821dc96 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java @@ -111,6 +111,12 @@ public class SysConfigServiceImpl implements ISysConfigService @Override public int updateConfig(SysConfig config) { + SysConfig temp = configMapper.selectConfigById(config.getConfigId()); + if (!StringUtils.equals(temp.getConfigKey(), config.getConfigKey())) + { + CacheUtils.remove(getCacheName(), getCacheKey(temp.getConfigKey())); + } + int row = configMapper.updateConfig(config); if (row > 0) { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index c0018f5ae..ffc4c0d38 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -146,7 +146,7 @@ public class SysDeptServiceImpl implements ISysDeptService } /** - * 查询部门人数 + * 根据父部门ID查询下级部门数量 * * @param parentId 部门ID * @return 结果