| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得文件配置") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('infra:file-config:query')") |
| | | public CommonResult<FileConfigRespVO> getFileConfig(@RequestParam("id") Long id) { |
| | | FileConfigDO config = fileConfigService.getFileConfig(id); |
| | | return success(BeanUtils.toBean(config, FileConfigRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得文件配置分页") |
| | | @PreAuthorize("@ss.hasPermission('infra:file-config:query')") |
| | | public CommonResult<PageResult<FileConfigRespVO>> getFileConfigPage(@Valid FileConfigPageReqVO pageVO) { |
| | | PageResult<FileConfigDO> pageResult = fileConfigService.getFileConfigPage(pageVO); |
| | | return success(BeanUtils.toBean(pageResult, FileConfigRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/test") |
| | | @Operation(summary = "测试文件配置是否正确") |
| | | @PreAuthorize("@ss.hasPermission('infra:file-config:query')") |
| | | public CommonResult<String> testFileConfig(@RequestParam("id") Long id) throws Exception { |
| | | String url = fileConfigService.testFileConfig(id); |
| | | return success(url); |