Skip to content

Commit

Permalink
修改参数键名时移除前缓存配置
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzongzhuan committed Dec 13, 2022
1 parent 7ee6ad8 commit f3d1f0a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public interface SysDeptMapper
{
/**
* 查询部门人数
* 查询下级部门数量
*
* @param dept 部门信息
* @return 结果
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public interface ISysDeptService
public List<Ztree> roleDeptTreeData(SysRole role);

/**
* 查询部门人数
* 根据父部门ID查询下级部门数量
*
* @param parentId 父部门ID
* @return 结果
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ public int insertConfig(SysConfig config)
@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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public List<Ztree> initZtree(List<SysDept> deptList, List<String> roleDeptList)
}

/**
* 查询部门人数
* 根据父部门ID查询下级部门数量
*
* @param parentId 部门ID
* @return 结果
Expand Down

0 comments on commit f3d1f0a

Please sign in to comment.