|
|
@@ -74,6 +74,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
|
|
|
if (!this.checkUniqueConfigKey(req.getConfigKey(), req.getId())) {
|
|
|
throw new CustomException("参数键名已存在");
|
|
|
}
|
|
|
+ ConfigUtil.removeConfigValue(req.getConfigKey());
|
|
|
SysConfig entity = BeanUtil.copyProperties(req, SysConfig.class);
|
|
|
this.updateById(entity);
|
|
|
}
|
|
|
@@ -82,6 +83,8 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void remove(String ids) {
|
|
|
List<String> idList = Arrays.asList(ids.split(","));
|
|
|
+ List<SysConfig> sysConfigs = this.listByIds(idList);
|
|
|
+ sysConfigs.forEach(config->ConfigUtil.removeConfigValue(config.getConfigKey()));
|
|
|
this.removeByIds(idList);
|
|
|
}
|
|
|
|