修改参数键名时移除前缓存配置
This commit is contained in:
		| @@ -18,6 +18,14 @@ public interface SysConfigMapper | ||||
|      */ | ||||
|     public SysConfig selectConfig(SysConfig config); | ||||
|  | ||||
|     /** | ||||
|      * 通过ID查询配置 | ||||
|      *  | ||||
|      * @param configId 参数ID | ||||
|      * @return 参数配置信息 | ||||
|      */ | ||||
|     public SysConfig selectConfigById(Long configId); | ||||
|  | ||||
|     /** | ||||
|      * 查询参数配置列表 | ||||
|      *  | ||||
|   | ||||
| @@ -134,6 +134,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())) | ||||
|         { | ||||
|             redisCache.deleteObject(getCacheKey(temp.getConfigKey())); | ||||
|         } | ||||
|  | ||||
|         int row = configMapper.updateConfig(config); | ||||
|         if (row > 0) | ||||
|         { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user