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);
|
|
|
}
|