Package com.elitesland.ystdms.sys.feign
Interface FileFeign
@FeignClient(name="yst-dms2-newsys",
path="/api/v1/comm/file",
contextId="fileFeign")
public interface FileFeign
文件管理 Feign 接口
-
Method Summary
Modifier and TypeMethodDescriptiondeleteFile(UUID id) 删除文件downloadFile(String id) 下载文件 注意:Feign不支持直接下载文件流,建议使用获取文件详情后通过URL下载getFileDetail(UUID id) 获取文件记录详情getFileDetails(FileDetailListQueryVO queryVO) 批量获取文件记录详情previewFile(String id) 预览文件 注意:Feign不支持直接预览文件流,建议使用获取文件详情后通过URL预览previewImage(String id) 图片预览 注意:Feign不支持直接返回图片数据,建议使用获取文件详情后通过URL访问uploadFile(org.springframework.web.multipart.MultipartFile file, String _child) 上传文件到OSS
-
Method Details
-
uploadFile
@PostMapping(value="/upload", consumes="multipart/form-data") ApiResult<FileUploadResultDto> uploadFile(@RequestPart("file") org.springframework.web.multipart.MultipartFile file, @RequestParam(value="_child",required=false) String _child) 上传文件到OSS- Parameters:
file- 文件_child- 子目录(可选)- Returns:
- 上传结果
-
downloadFile
下载文件 注意:Feign不支持直接下载文件流,建议使用获取文件详情后通过URL下载- Parameters:
id- 文件ID或文件标识符- Returns:
- 文件下载响应(需要在调用方处理)
-
previewFile
预览文件 注意:Feign不支持直接预览文件流,建议使用获取文件详情后通过URL预览- Parameters:
id- 文件ID或文件标识符- Returns:
- 文件预览响应(需要在调用方处理)
-
previewImage
图片预览 注意:Feign不支持直接返回图片数据,建议使用获取文件详情后通过URL访问- Parameters:
id- 文件ID或文件标识符- Returns:
- 图片数据(需要在调用方处理)
-
getFileDetail
@GetMapping("/detail/{id}") ApiResult<SysFileRecordDetailRespDTO> getFileDetail(@PathVariable("id") UUID id) 获取文件记录详情- Parameters:
id- 文件ID- Returns:
- 文件记录详情
-
getFileDetails
@PostMapping("/detail/batch") ApiResult<List<SysFileRecordDetailRespDTO>> getFileDetails(@RequestBody FileDetailListQueryVO queryVO) 批量获取文件记录详情- Parameters:
queryVO- 查询VO,包含文件ID列表- Returns:
- 文件记录详情列表
-
deleteFile
删除文件- Parameters:
id- 文件ID- Returns:
- 是否删除成功
-