数据库去掉industrytype,适配QA新结构,解决自动和手动归档产生两次记录问题
This commit is contained in:
@@ -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 {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user