feat: 保留系统配置的isSystem值

主要修改:
1. 在SystemConfigService中更新配置时,保留原有的isSystem值,以确保配置的一致性和完整性。

技术细节:
- 通过保留isSystem值,增强了系统配置的管理能力,避免了不必要的数据丢失。
This commit is contained in:
zyh
2025-08-27 17:39:16 +08:00
parent b03c58ae1b
commit 1d43b91b9f

View File

@@ -133,6 +133,7 @@ public class SystemConfigService {
SystemConfig existing = systemConfigMapper.findByKey(config.getConfigKey()); SystemConfig existing = systemConfigMapper.findByKey(config.getConfigKey());
if (existing != null) { if (existing != null) {
config.setId(existing.getId()); config.setId(existing.getId());
config.setIsSystem(existing.getIsSystem()); // 保留原有的 isSystem 值
if (systemConfigMapper.update(config) > 0) { if (systemConfigMapper.update(config) > 0) {
successCount++; successCount++;
} }