mirror of https://gitee.com/xiaonuobase/snowy
【更新】优化参数配置的删除逻辑
parent
1477ed0ac9
commit
aea99f1a76
|
@ -156,12 +156,14 @@ public class DevConfigServiceImpl extends ServiceImpl<DevConfigMapper, DevConfig
|
||||||
if(devConfigResultList.size() != 1 || !devConfigResultList.get(0).equals(DevConfigCategoryEnum.BIZ_DEFINE.getValue())) {
|
if(devConfigResultList.size() != 1 || !devConfigResultList.get(0).equals(DevConfigCategoryEnum.BIZ_DEFINE.getValue())) {
|
||||||
throw new CommonException("不可删除系统内置配置");
|
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());
|
commonCacheOperator.remove(CONFIG_CACHE_KEY + devConfig.getConfigKey());
|
||||||
});
|
});
|
||||||
// 执行删除
|
|
||||||
this.removeByIds(devConfigIdList);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue