修改参数键名时移除前缓存配置

This commit is contained in:
RuoYi 2022-12-13 15:09:38 +08:00
parent 7ee6ad8aec
commit f3d1f0afe2
4 changed files with 9 additions and 3 deletions

View File

@ -12,7 +12,7 @@ import com.ruoyi.common.core.domain.entity.SysDept;
public interface SysDeptMapper public interface SysDeptMapper
{ {
/** /**
* 查询部门 * 查询下级部门数
* *
* @param dept 部门信息 * @param dept 部门信息
* @return 结果 * @return 结果

View File

@ -45,7 +45,7 @@ public interface ISysDeptService
public List<Ztree> roleDeptTreeData(SysRole role); public List<Ztree> roleDeptTreeData(SysRole role);
/** /**
* 查询部门 * 根据父部门ID查询下级部门数
* *
* @param parentId 父部门ID * @param parentId 父部门ID
* @return 结果 * @return 结果

View File

@ -111,6 +111,12 @@ public class SysConfigServiceImpl implements ISysConfigService
@Override @Override
public int updateConfig(SysConfig config) 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); int row = configMapper.updateConfig(config);
if (row > 0) if (row > 0)
{ {

View File

@ -146,7 +146,7 @@ public class SysDeptServiceImpl implements ISysDeptService
} }
/** /**
* 查询部门 * 根据父部门ID查询下级部门数
* *
* @param parentId 部门ID * @param parentId 部门ID
* @return 结果 * @return 结果