chore: 移除项目内无用代码(28 文件)

- 清理任务面板/SPA 化改造遗留的未使用变量与函数(模板管理配套 6 函数、
  payloadForDisplay/showTip/hasRunning/schedulePoll/removeMatchedRowLocally 等 30+ 处)
- 清理未使用 import(getBrandTemplateXlsxUrl/uploadTempFileToJava/getProductRiskTasksBatch 等)
- useTaskProgressLoop 改为仅类型导入;progress/task-request 缓存未用参数精简
- DeleteBrandRunService 删除永不执行的 taskItems 死分支
- 全量 vue-tsc(含 --noUnusedLocals/--noUnusedParameters)0 错误;648 测试全过
This commit is contained in:
2026-09-08 10:20:30 +08:00
parent e248b6e43a
commit d9e3f34d37
28 changed files with 24 additions and 408 deletions
@@ -379,39 +379,6 @@ public class DeleteBrandRunService {
FileTaskEntity taskEntity = taskById.get(entity.getTaskId());
item.setCreatedAt(fmt(taskEntity == null ? null : taskEntity.getCreatedAt()));
item.setFinishedAt(fmt(taskEntity == null ? null : taskEntity.getFinishedAt()));
List<DeleteBrandResultItemVo> taskItems = null;
if (taskItems != null && entity.getSourceFilename() != null && !entity.getSourceFilename().isBlank()) {
for (DeleteBrandResultItemVo candidate : taskItems) {
if (candidate == null) {
continue;
}
if (entity.getSourceFilename().equals(candidate.getSourceFilename())) {
item.setMatched(candidate.isMatched());
item.setMatchStatus(candidate.getMatchStatus());
item.setMatchMessage(candidate.getMatchMessage());
// 如果物理结果已经成功,说明已经处理过,强制标记为匹配成功
if (item.isSuccess() && candidate.getShopId() != null && !candidate.getShopId().isBlank()) {
item.setMatched(true);
item.setMatchStatus(ZiniaoShopIndexService.MATCH_STATUS_MATCHED);
item.setMatchMessage(null);
}
item.setShopId(candidate.getShopId());
item.setCompanyName(candidate.getCompanyName());
item.setPlatform(candidate.getPlatform());
item.setOpenStoreUrl(candidate.getOpenStoreUrl());
// 历史表里可能只有通用 errorMessage,优先返回任务当时的真实 error
// 但如果物理结果已成功,就不应该再显示所谓“未匹配”的报错
if (item.isSuccess()) {
item.setError(null);
} else if ((item.getError() == null || item.getError().isBlank()) && candidate.getError() != null && !candidate.getError().isBlank()) {
item.setError(candidate.getError());
}
break;
}
}
}
}
return item;
}).toList());