| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得文件") |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | @PreAuthorize("@ss.hasPermission('infra:file:query')") |
| | | public CommonResult<FileRespVO> getFile(@RequestParam("id") Long id) { |
| | | return success(BeanUtils.toBean(fileService.getFile(id), FileRespVO.class)); |
| | | } |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得文件分页") |
| | | @PreAuthorize("@ss.hasPermission('infra:file:query')") |
| | | public CommonResult<PageResult<FileRespVO>> getFilePage(@Valid FilePageReqVO pageVO) { |
| | | PageResult<FileDO> pageResult = fileService.getFilePage(pageVO); |
| | | return success(BeanUtils.toBean(pageResult, FileRespVO.class)); |