fix 修复 根据key更新参数配置报null问题
This commit is contained in:
parent
e729a924d4
commit
dd9ef8431b
@ -136,12 +136,12 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
|
|||||||
@CachePut(cacheNames = CacheNames.SYS_CONFIG, key = "#config.configKey")
|
@CachePut(cacheNames = CacheNames.SYS_CONFIG, key = "#config.configKey")
|
||||||
@Override
|
@Override
|
||||||
public String updateConfig(SysConfig config) {
|
public String updateConfig(SysConfig config) {
|
||||||
SysConfig temp = baseMapper.selectById(config.getConfigId());
|
|
||||||
if (!StringUtils.equals(temp.getConfigKey(), config.getConfigKey())) {
|
|
||||||
CacheUtils.evict(CacheNames.SYS_CONFIG, temp.getConfigKey());
|
|
||||||
}
|
|
||||||
int row = 0;
|
int row = 0;
|
||||||
if (config.getConfigId() != null) {
|
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);
|
row = baseMapper.updateById(config);
|
||||||
} else {
|
} else {
|
||||||
row = baseMapper.update(config, new LambdaQueryWrapper<SysConfig>()
|
row = baseMapper.update(config, new LambdaQueryWrapper<SysConfig>()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user