From da1b18792b9ee43b0cc790ab31bbc25b925bb6cd Mon Sep 17 00:00:00 2001 From: zlyx <1242874891@qq.com> Date: 星期五, 30 十二月 2022 16:50:44 +0800 Subject: [PATCH] refactor 重构 BaseMapperPlus, 引入 MP V3.5.3 工具类 Db 进行批量增删改操作 ; --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) 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 72dc42b..c39ec74 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 @@ -138,6 +138,10 @@ public String updateConfig(SysConfig config) { int row = 0; if (config.getConfigId() != null) { + SysConfig temp = baseMapper.selectById(config.getConfigId()); + if (!StringUtils.equals(temp.getConfigKey(), config.getConfigKey())) { + CacheUtils.evict(CacheNames.SYS_CONFIG, temp.getConfigKey()); + } row = baseMapper.updateById(config); } else { row = baseMapper.update(config, new LambdaQueryWrapper<SysConfig>() -- Gitblit v1.9.3