数据库去掉industrytype,适配QA新结构,解决自动和手动归档产生两次记录问题

This commit is contained in:
wh
2026-05-10 16:40:24 +08:00
parent 9425ff3a1e
commit 84ac2fe5c7
12 changed files with 35 additions and 45 deletions

View File

@@ -211,8 +211,13 @@ public class AnnotationResultArchiveService {
String archiveReason) {
LocalDateTime archivedAt = LocalDateTime.now();
// 从对象存储读取 qa.json 内容
// String qaContentJson = loadQaContentJson(result);
int updated = annotationResultMapper.markArchived(
result.getId(),
result.getCompanyId(),
reviewerId);
if (updated == 0) {
return null;
}
AnnotationResultHistory history = AnnotationResultHistory.builder()
.id(IdGenerator.nextId())
@@ -229,18 +234,11 @@ public class AnnotationResultArchiveService {
.archiveReason(archiveReason)
.archivedBy(reviewerId)
.archivedAt(archivedAt)
.createdAt(archivedAt)
.reviewerId(null)
.reviewerName("auto")
.build();
annotationResultHistoryMapper.insert(history);
int updated = annotationResultMapper.markArchived(
result.getId(),
result.getCompanyId(),
reviewerId);
if (updated == 0) {
return null;
}
return new MergeReviewResultResponse(result.getId(), history.getId(), archiveReason, archivedAt);
}
@@ -368,4 +366,4 @@ public class AnnotationResultArchiveService {
}
}
}
}