修复配置更新失败问题

This commit is contained in:
2025-08-11 16:14:16 +08:00
parent 74ac39a926
commit 83f112c260

View File

@@ -29,6 +29,13 @@ func UpdateConfigs(tx *gorm.DB, configs []model.ConfigUpdate) error {
return nil
}
// 使用事务批量更新配置
return tx.Updates(&configs).Error
// 批量更新配置
for _, config := range configs {
err := tx.Updates(&config).Error
if err != nil {
return err
}
}
return nil
}