fix: 清理 AdapterController 中残留的 AdapterConfig/ObjectMapper 引用

This commit is contained in:
mediabot-pt
2026-07-01 10:40:36 +08:00
parent 83f6a729c2
commit a674734258

View File

@@ -79,15 +79,6 @@ public class AdapterController {
SiteConfig siteConfig = siteConfigMapper.selectById(configId);
if (siteConfig == null) return ApiResponse.error(404, "配置不存在");
String configJson;
try { configJson = storageService.read(siteConfig.getStoragePath()); }
catch (Exception e) { return ApiResponse.error(500, "读取配置失败: " + e.getMessage()); }
if (configJson == null) return ApiResponse.error(404, "配置内容为空");
AdapterConfig adapterConfig;
try { adapterConfig = objectMapper.readValue(configJson, AdapterConfig.class); }
catch (Exception e) { return ApiResponse.error(400, "配置格式无效: " + e.getMessage()); }
// 获取该站点所有结果,按URL分组取最新
List<AccessResult> allResults = accessResultMapper.selectBySiteId(siteId);
Map<String, AccessResult> latestByUrl = allResults.stream()