fix: 重复提交配置改为幂等,返回已有记录而非报错

This commit is contained in:
mediabot-pt
2026-06-29 22:59:24 +08:00
parent f351d71d18
commit a741736a5d

View File

@@ -61,7 +61,8 @@ public class ConfigServiceImpl implements ConfigService {
String schemaVersion, Long submitterId) {
SiteConfig existing = getConfig(siteId, version);
if (existing != null) {
throw new IllegalArgumentException("该版本已存在: " + version);
log.info("配置版本已存在,跳过: siteId={}, version={}", siteId, version);
return existing;
}
String configHash = HmacUtil.sha256(configJson);