新增系统管理员岗位
This commit is contained in:
@@ -13,9 +13,11 @@ import com.labelsys.backend.enums.UserPosition;
|
||||
import com.labelsys.backend.service.AnnotationResultArchiveService;
|
||||
import com.labelsys.backend.service.AnnotationResultService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -34,28 +36,37 @@ public class AnnotationResultController {
|
||||
|
||||
@Operation(summary = "分页查询标注结果")
|
||||
@GetMapping
|
||||
public Result<PageResult<AnnotationResultResponse>> page(AnnotationResultPageQuery query) {
|
||||
public Result<PageResult<AnnotationResultResponse>> page(@ParameterObject AnnotationResultPageQuery query) {
|
||||
return Result.success(annotationResultService.pageResults(UserContext.requireUser(), query));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询标注结果详情")
|
||||
@GetMapping("/{id}")
|
||||
public Result<AnnotationResultResponse> detail(@PathVariable Long id) {
|
||||
public Result<AnnotationResultResponse> detail(
|
||||
@Parameter(description = "结果ID", example = "191000000000000401")
|
||||
@PathVariable Long id
|
||||
) {
|
||||
return Result.success(annotationResultService.getResult(UserContext.requireUser(), id));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询标注结果比对信息")
|
||||
@RequirePosition(UserPosition.REVIEWER)
|
||||
@GetMapping("/{id}/compare")
|
||||
public Result<AnnotationResultCompareResponse> compare(@PathVariable Long id) {
|
||||
public Result<AnnotationResultCompareResponse> compare(
|
||||
@Parameter(description = "结果ID", example = "191000000000000401")
|
||||
@PathVariable Long id
|
||||
) {
|
||||
return Result.success(annotationResultService.compareResult(UserContext.requireUser(), id));
|
||||
}
|
||||
|
||||
@Operation(summary = "提交合并审核结果")
|
||||
@RequirePosition(UserPosition.REVIEWER)
|
||||
@PostMapping("/{id}/merge-review")
|
||||
public Result<MergeReviewResultResponse> mergeReview(@PathVariable Long id,
|
||||
@Valid @RequestBody MergeReviewResultRequest request) {
|
||||
public Result<MergeReviewResultResponse> mergeReview(
|
||||
@Parameter(description = "结果ID", example = "191000000000000401")
|
||||
@PathVariable Long id,
|
||||
@Valid @RequestBody MergeReviewResultRequest request
|
||||
) {
|
||||
return Result.success(annotationResultArchiveService.mergeReview(UserContext.requireUser(), id, request));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user