package com.dji.sample.media.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.dji.sample.common.model.PaginationData; import com.dji.sample.common.model.ResponseResult; import com.dji.sample.media.model.FileUploadDTO; import com.dji.sample.media.model.MediaFileDTO; import com.dji.sample.media.model.MediaFileEntity; import com.dji.sample.media.model.MediaFileQueryParam; import com.drew.imaging.ImageProcessingException; import java.awt.*; import java.io.IOException; import java.net.URL; import java.util.List; /** * @author sean * @version 0.2 * @date 2021/12/9 */ public interface IFileService { /** * Query if the file already exists based on the workspace id and the fingerprint of the file. * * @param workspaceId * @param fingerprint * @return */ Boolean checkExist(String workspaceId, String fingerprint); /** * Save the basic information of the file to the database. * * @param workspaceId * @param file * @return */ Integer saveFile(String workspaceId, FileUploadDTO file) throws ImageProcessingException, IOException; /** * 存储水印图片 * @param workspaceId * @param file * @throws IOException * @throws FontFormatException * @throws ImageProcessingException */ void saveMarkFile(String workspaceId, FileUploadDTO file) throws IOException, FontFormatException, ImageProcessingException; void updateMarkMediaFileNames(String jobId); /** * 获取媒体文件状态 * @param fileId * @return */ Object mediaInfo(String fileId); /** * Query information about all files in this workspace based on the workspace id. * * @param workspaceId * @return */ List getAllFilesByWorkspaceId(String workspaceId); PaginationData MediaQuery(Integer page, Integer pageSize, Long updateStart, Long updateEnd, Long photoStart, Long photoEnd, String jobName,String worksapceId,String isVedio); /** * 获取图斑图片集合 * @param dkbh * @param workspaceId * @return */ List listByIsadd(String dkbh,String workspaceId); /** * 图斑图片审核状态改变 * @param fileId * @return */ ResponseResult updateExamByFileId(String fileId); List listMediaFileEntity(String workspaceId, String jobId); /** * Paginate through all media files in this workspace. * * @param workspaceId * @param page * @param pageSize * @return */ PaginationData getMediaFilesPaginationByWorkspaceId(String workspaceId, long page, long pageSize, MediaFileQueryParam mediaFileQueryParam); /** * Get the download address of the file. * * @param workspaceId * @param fileId * @return */ URL getObjectUrl(String workspaceId, String fileId); /** * Query all media files of a job. * * @param workspaceId * @param jobId * @return */ List getFilesByWorkspaceAndJobId(String workspaceId, String jobId); /** * 更新文件 * * @param workspaceId 项目id * @param mediaFileEntity * @return */ Boolean updateMediaFile(String workspaceId, MediaFileEntity mediaFileEntity); int deleteMedia(String workspaceId, String fileId); }