刘光辉
4 小时以前 06f314545ac3514d7ce28939920866ae8188d31c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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<DmsFilePageCountVO> getPageCount(
            @PathVariable("fileVersionId") UUID fileVersionId) throws IOException {
        return ActionResult.success(pageCountService.getPageCount(fileVersionId));
    }
}