标注结果和归档优化

This commit is contained in:
wh
2026-05-07 00:23:27 +08:00
parent 9d8d06427c
commit 2ccd8f39fe
5 changed files with 27 additions and 34 deletions

View File

@@ -1,6 +1,6 @@
package com.labelsys.backend.controller;
import com.labelsys.backend.context.LoginUser;
import com.labelsys.backend.context.UserContext;
import com.labelsys.backend.dto.common.PageResult;
import com.labelsys.backend.dto.request.AnnotationResultHistoryPageQuery;
import com.labelsys.backend.dto.response.AnnotationResultHistoryResponse;
@@ -27,17 +27,15 @@ public class AnnotationResultArchiveController {
@Operation(summary = "分页查询归档历史")
@GetMapping
public ResponseEntity<PageResult<AnnotationResultHistoryResponse>> pageHistory(
@Valid AnnotationResultHistoryPageQuery query,
@Parameter(hidden = true) LoginUser currentUser) {
return ResponseEntity.ok(annotationResultArchiveService.pageHistory(currentUser, query));
@Valid AnnotationResultHistoryPageQuery query) {
return ResponseEntity.ok(annotationResultArchiveService.pageHistory(UserContext.requireUser(), query));
}
@Operation(summary = "查询归档历史详情")
@GetMapping("/{id}")
public ResponseEntity<AnnotationResultHistoryResponse> getHistory(
@Parameter(description = "历史记录ID", example = "901")
@PathVariable Long id,
@Parameter(hidden = true) LoginUser currentUser) {
return ResponseEntity.ok(annotationResultArchiveService.getHistory(currentUser, id));
@PathVariable Long id) {
return ResponseEntity.ok(annotationResultArchiveService.getHistory(UserContext.requireUser(), id));
}
}