ny
昨天 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
package jnpf.file;
 
import jnpf.base.ActionResult;
import jnpf.base.vo.PaginationVO;
import jnpf.file.fallback.YozoApiFallback;
import jnpf.model.YozoFileParams;
import jnpf.utils.FeignName;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
import java.io.IOException;
 
/**
 * 永中服务
 *
 * @author JNPF开发平台组
 * @version V3.1.0
 * @copyright 引迈信息技术有限公司(https://www.jnpfsoft.com)
 * @date  2021/4/15
 */
@FeignClient(name = FeignName.FILE_SERVER_NAME, fallback = YozoApiFallback.class)
public interface YozoApi {
    /**
     * 获取预览url
     * @param params
     * @return
     */
    @PostMapping("/getUrl")
    ActionResult getUrl(@RequestBody YozoFileParams params);
 
    /**
     * 上传本地文件
     * @param file
     * @return
     * @throws IOException
     */
    @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE )
    ActionResult upload (@RequestPart("multipartFile") MultipartFile file) throws IOException;
 
    /**
     * 新建文件
     * @param fileName
     * @param templateType
     * @return
     */
    @GetMapping("/newCreate")
    ActionResult newCreate(@RequestParam("fileName") String fileName,@RequestParam("templateType") String templateType);
 
    /**
     * http上传文件
     * @param fileUrl
     * @return
     */
    @GetMapping("/uploadByHttp")
    ActionResult uploadByHttp(@RequestParam("fileUrl") String fileUrl);
 
    /**
     * 永中下载文件
     * @param fileVersionId
     * @return
     */
    @GetMapping("/downloadFile")
    String downloadFile(@RequestParam("fileVersionId")String fileVersionId);
 
    /**
     * 删除文件版本
     * @param fileVersionId
     * @return
     */
    @GetMapping("/deleteVersionFile")
    ActionResult deleteVersion(@RequestParam("fileVersionId")String fileVersionId);
 
    /**
     * 批量删除文件版本
     * @param fileVersionIds
     * @return
     */
    @GetMapping("/batchDelete")
    ActionResult batchDelete(@RequestParam("fileVersionIds")String[] fileVersionIds);
 
    /**
     * 在线编辑
     * @param fileVersionId
     * @return
     */
    @GetMapping("/editFile")
    ActionResult editFile (@RequestParam("fileVersionId")String fileVersionId);
 
    /**
     * 文档列表
     * @param pageModel
     * @return
     */
    @PostMapping("/documentList")
    ActionResult documentList(@RequestBody PaginationVO pageModel);
 
    /**
     * 本地同步编辑过后的文件
     * @param fileVersionId
     * @return
     */
    @GetMapping("/updateFile")
    ActionResult updateFile(@RequestParam("fileVersionId") String fileVersionId);
 
 
}