package jnpf.file; import jnpf.base.vo.DownloadVO; import jnpf.file.fallback.FileApiFallback; import jnpf.model.ExportModel; import jnpf.utils.FeignName; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; /** * 通过api调用文件路径 * @author JNPF开发平台组 * @version V3.1.0 * @copyright 引迈信息技术有限公司(https://www.jnpfsoft.com) * @date 2021-03-24 */ @FeignClient(name = FeignName.FILE_SERVER_NAME, fallback = FileApiFallback.class) public interface FileApi { /** * 通过type获取路径 * * @param type 类型 * @return */ @GetMapping("/getPath/{type}") String getPath(@PathVariable("type") String type); /** * 导出 * @param exportModel * @return */ @PostMapping("/export") DownloadVO exportFile(@RequestBody ExportModel exportModel); /** * 获取本地保存路径 * * @param * @return */ @GetMapping("/getLocalBasePath") String getLocalBasePath(); /** * 获取文件服务器基础路径 * * @return */ // @GetMapping("/getBasePath") // String getBasePath(); /** * 获取允许文件预览类型 * * @param * @return */ @GetMapping("/getAllowPreviewFileType") String getAllowPreviewFileType(); /** * 获取当前存储平台 * @return */ @GetMapping("/fileExists") Boolean fileExists(@RequestParam("type") String type, @RequestParam("fileName") String fileName); }