类 AbstractFileOperateSpiController

所有已实现的接口:
org.springframework.beans.factory.InitializingBean
直接已知子类:
SystemController

public abstract class AbstractFileOperateSpiController extends AbstractSecurityController
  • 构造器详细资料

    • AbstractFileOperateSpiController

      public AbstractFileOperateSpiController()
  • 方法详细资料

    • acquireFileOperateSpi

      protected FileOperateSpi acquireFileOperateSpi()
    • clearCdnPrefix

      protected String clearCdnPrefix(String path)
      清除给定文件地址的CDN前缀。如:https://qnyun.com/oss/12345678
           去掉前缀后,只剩下"12345678"
       
      参数:
      path - 给定的文件资源地址
      返回:
    • getCdnUrl

      protected String getCdnUrl()
      返回存储文件的前缀,根据平台配置参数:本地、FTP或OSS远程存储不同而返回不同前缀。
      返回:
    • getLocalFileData

      protected byte[] getLocalFileData(com.walker.file.FileInfo fileInfo)
      根据文件信息,加载文件二进制内容。
      参数:
      fileInfo -
      返回:
    • getFileInfo

      protected com.walker.file.FileInfo getFileInfo(String id)
      根据文件id编号,获取文件基本信息。
      参数:
      id -
      返回:
    • getFileInfoList

      protected List<com.walker.file.FileInfo> getFileInfoList(List<String> ids)
    • uploadFileToLocal

      protected com.walker.file.FileInfo uploadFileToLocal(InputStream inputStream, String fileName, String groupId, long fileSize, Integer businessType, String owner) throws Exception
      抛出:
      Exception
    • uploadFileToLocal

      protected com.walker.file.FileInfo[] uploadFileToLocal(InputStream[] inputStream, String[] fileName, String groupId, long[] fileSize, Integer businessType, String owner) throws Exception
      抛出:
      Exception
    • uploadFileToLocal

      protected com.walker.file.FileInfo uploadFileToLocal(org.springframework.web.multipart.MultipartFile multipartFile, String groupId, Integer businessType, String owner, String fileContentType) throws Exception
      上传文件到本地,业务控制器直接调用该方法。
      参数:
      multipartFile -
      groupId - 分组ID,可选
      businessType - 业务类型,可选,请参考电商模块(PID)
      owner - 数据归属:平台为-1,其他为顶级机构ID(商户ID)
      fileContentType - 前端传入的文件上传类型:uploadf 表示文件,其他为图片
      返回:
      抛出:
      Exception - 上传失败抛出异常
    • uploadFileToLocal

      protected com.walker.file.FileInfo[] uploadFileToLocal(org.springframework.web.multipart.MultipartFile[] multipartFile, String groupId, Integer businessType, String owner, String fileContentType) throws Exception
      上传多个文件
      参数:
      multipartFile -
      groupId -
      businessType -
      owner -
      fileContentType -
      返回:
      抛出:
      Exception
    • uploadFileToRemote

      protected com.walker.file.FileInfo uploadFileToRemote(InputStream inputStream, String fileName, String groupId, long fileSize, Integer businessType, String owner) throws Exception
      抛出:
      Exception
    • uploadFileToRemote

      protected com.walker.file.FileInfo[] uploadFileToRemote(InputStream[] inputStream, String[] fileName, String groupId, long[] fileSize, Integer businessType, String owner) throws Exception
      抛出:
      Exception
    • uploadFileToRemote

      protected com.walker.file.FileInfo uploadFileToRemote(org.springframework.web.multipart.MultipartFile multipartFile, String groupId, Integer businessType, String owner, String fileContentType) throws Exception
      抛出:
      Exception
    • uploadFileToRemote

      protected com.walker.file.FileInfo[] uploadFileToRemote(org.springframework.web.multipart.MultipartFile[] multipartFile, String groupId, Integer businessType, String owner, String fileContentType) throws Exception
      抛出:
      Exception
    • uploadFileToLocal

      @Deprecated protected com.walker.file.FileInfo uploadFileToLocal(InputStream inputStream, String fileName, String groupId, long fileSize) throws Exception
      已过时。
      上传文件到服务器本地磁盘。
      参数:
      inputStream - 文件流,系统使用完会自动关闭
      fileName - 文件名,如: demo.txt
      groupId - 业务ID,可选
      返回:
      抛出:
      Exception
    • uploadFileToRemote

      @Deprecated protected com.walker.file.FileInfo uploadFileToRemote(InputStream inputStream, String fileName, String groupId, long fileSize) throws Exception
      已过时。
      上传文件到远程服务。
      参数:
      inputStream - 文件流,系统使用完会自动关闭
      fileName - 文件名,如: demo.txt
      groupId - 业务ID,可选
      返回:
      抛出:
      Exception
    • uploadFileToRemote

      protected com.walker.file.FileInfo uploadFileToRemote(String absoluteFilePath, Integer businessType, String owner) throws Exception
      抛出:
      Exception
    • uploadFileToRemote

      @Deprecated protected com.walker.file.FileInfo uploadFileToRemote(String absoluteFilePath) throws Exception
      已过时。
      上传文件到远程服务目录中。
      参数:
      absoluteFilePath -
      返回:
      返回上传文件基本信息
      抛出:
      Exception