【更新】优化参数配置的删除逻辑

pull/110/MERGE
xuyuxiang 2023-05-23 11:01:26 +08:00
parent 1477ed0ac9
commit aea99f1a76
1 changed files with 5 additions and 3 deletions

View File

@ -156,12 +156,14 @@ public class DevConfigServiceImpl extends ServiceImpl<DevConfigMapper, DevConfig
if(devConfigResultList.size() != 1 || !devConfigResultList.get(0).equals(DevConfigCategoryEnum.BIZ_DEFINE.getValue())) {
throw new CommonException("不可删除系统内置配置");
}
devConfigList.forEach(devConfig -> {
List<DevConfig> deleteDevConfigList = this.listByIds(devConfigIdList);
// 执行删除
this.removeByIds(devConfigIdList);
deleteDevConfigList.forEach(devConfig -> {
// 移除对应的缓存
commonCacheOperator.remove(CONFIG_CACHE_KEY + devConfig.getConfigKey());
});
// 执行删除
this.removeByIds(devConfigIdList);
}
}
}