ny
23 小时以前 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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);
}