package jnpf.dmsController.preview; import io.swagger.v3.oas.annotations.Operation; import jnpf.base.ActionResult; import jnpf.dmsEntity.preview.vo.DmsFilePageCountVO; import jnpf.dmsService.DmsFilePageCountService; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.io.IOException; import java.util.UUID; @RestController @RequestMapping("/file-versions") @RequiredArgsConstructor public class DmsFilePageCountController { private final DmsFilePageCountService pageCountService; @Operation(summary = "查询文件版本总页数") @GetMapping("/{fileVersionId}/page-count") public ActionResult getPageCount( @PathVariable("fileVersionId") UUID fileVersionId) throws IOException { return ActionResult.success(pageCountService.getPageCount(fileVersionId)); } }