Package com.elitesland.ystdms.sys.feign
Interface FileFeign
@FeignClient(name="${yst.service.system:yst-dms2-newsys}",
path="/api/v1/comm/file",
contextId="fileFeign")
public interface FileFeign
文件管理 Feign 接口
-
Method Summary
Modifier and TypeMethodDescriptiondeleteArchive(UUID archiveId) 删除压缩包及其所有解压文件deleteFile(UUID id) 删除文件voiddownloadArchiveFile(UUID fileId, jakarta.servlet.http.HttpServletResponse response) 下载压缩包内文件downloadFile(String id) 下载文件 注意:Feign不支持直接下载文件流,建议使用获取文件详情后通过URL下载extParamUpload(org.springframework.web.multipart.MultipartFile file, String _child, Map<String, String> extParam) 上传文件extParamUploadArchive(org.springframework.web.multipart.MultipartFile file, Map<String, String> extParam) 上传并解压压缩包getArchiveFile(UUID fileId) 获取压缩包内文件信息getArchiveFiles(UUID archiveId) 获取压缩包内文件列表getDownloadUrls(List<String> ids) 批量获取文件下载URLgetFileDetail(UUID id) 获取文件记录详情getFileDetails(FileDetailListQueryVO queryVO) 批量获取文件记录详情previewFile(String id) 预览文件 注意:Feign不支持直接预览文件流,建议使用获取文件详情后通过URL预览previewImage(String id) 图片预览 注意:Feign不支持直接返回图片数据,建议使用获取文件详情后通过URL访问uploadArchive(org.springframework.web.multipart.MultipartFile file) 上传并解压压缩包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:
- 上传结果
-
uploadArchive
@PostMapping(value="/archive/upload", consumes="multipart/form-data") ApiResult<ArchiveUploadResultDto> uploadArchive(@RequestParam("file") org.springframework.web.multipart.MultipartFile file) 上传并解压压缩包 -
extParamUpload
@PostMapping(value="/extParamUpload", consumes="multipart/form-data") ApiResult<FileUploadResultDto> extParamUpload(@RequestParam("file") org.springframework.web.multipart.MultipartFile file, @RequestParam(value="_child",required=false) String _child, @RequestParam(required=false) Map<String, String> extParam) 上传文件 -
extParamUploadArchive
@PostMapping(value="/archive/extParamUpload", consumes="multipart/form-data") ApiResult<ArchiveUploadResultDto> extParamUploadArchive(@RequestParam("file") org.springframework.web.multipart.MultipartFile file, @RequestParam(required=false) Map<String, String> extParam) 上传并解压压缩包 -
getArchiveFiles
@GetMapping("/archive/{archiveId}/files") ApiResult<List<ArchiveFileDto>> getArchiveFiles(@PathVariable("archiveId") UUID archiveId) 获取压缩包内文件列表 -
getArchiveFile
@GetMapping("/archive/file/{fileId}") ApiResult<ArchiveFileDto> getArchiveFile(@PathVariable("fileId") UUID fileId) 获取压缩包内文件信息 -
downloadArchiveFile
@GetMapping("/archive/file/{fileId}/download") void downloadArchiveFile(@PathVariable("fileId") UUID fileId, jakarta.servlet.http.HttpServletResponse response) 下载压缩包内文件 -
deleteArchive
@DeleteMapping("/archive/{archiveId}") ApiResult<Boolean> deleteArchive(@PathVariable("archiveId") UUID archiveId) 删除压缩包及其所有解压文件 -
downloadFile
下载文件 注意:Feign不支持直接下载文件流,建议使用获取文件详情后通过URL下载- Parameters:
id- 文件ID或文件标识符- Returns:
- 文件下载响应(需要在调用方处理)
-
getDownloadUrls
@PostMapping("/download/batch-urls") ApiResult<Map<String,String>> getDownloadUrls(@RequestBody List<String> ids) 批量获取文件下载URL- Parameters:
ids- 文件ID列表- Returns:
- Map,key为文件ID,value为对应的下载URL
-
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:
- 是否删除成功
-