ISysFileService.java 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package com.xunmei.file.service;
  2. import com.xunmei.common.core.domain.registerbook.dto.CoreRegisterBookPdfExportDto;
  3. import com.xunmei.common.core.domain.registerbook.dto.ExportPdfDto;
  4. import com.xunmei.file.vo.FileBase64Vo;
  5. import com.xunmei.system.api.domain.SafeCheckTaskRegisterBookVo;
  6. import org.springframework.web.multipart.MultipartFile;
  7. import javax.servlet.http.HttpServletResponse;
  8. import java.io.IOException;
  9. import java.io.InputStream;
  10. import java.util.Map;
  11. /**
  12. * 文件上传接口
  13. *
  14. * @author xunmei
  15. */
  16. public interface ISysFileService
  17. {
  18. /**
  19. * 文件上传接口
  20. *
  21. * @param file 上传的文件
  22. * @return 访问地址
  23. * @throws Exception
  24. */
  25. String uploadFile(MultipartFile file) throws Exception;
  26. /**
  27. * 文件上传接口
  28. *
  29. * @param file 上传的文件
  30. * @return 访问地址
  31. * @throws Exception
  32. */
  33. String uploadFile(MultipartFile file, String busType) throws Exception;
  34. /**
  35. * 文件下载接口
  36. *
  37. * @param response
  38. * @param filePath
  39. * @return
  40. * @throws Exception
  41. */
  42. void downloadFile(HttpServletResponse response, String filePath) throws Exception;
  43. String generateEduTrainingPdf(Map<String, Object> data) throws Exception;
  44. String generateResumptionPdf(Map<String, Object> data) throws Exception;
  45. String generateSafeCheckPdf(SafeCheckTaskRegisterBookVo data) throws Exception;
  46. String getRelativePath(String path);
  47. void getFileStream(String path, HttpServletResponse response);
  48. String generateDrillPdf(Map<String, Object> data)throws Exception;
  49. /**
  50. * base64转换为指定类型文件,并返回后端路径
  51. * @param file
  52. * @return
  53. * @throws Exception
  54. */
  55. String uploadFileBase64(FileBase64Vo file)throws Exception;
  56. String absolutePath(String path);
  57. InputStream getFileStream(String path) throws IOException;
  58. void registerBookCompressPdf(ExportPdfDto exportDto, HttpServletResponse response) throws IOException;
  59. void cutFileCompress(CoreRegisterBookPdfExportDto exportDto);
  60. }