rain
2024-06-14 8d9a2d656e4ae007590c622e5f7c228adacdca49
src/main/java/com/dji/sample/media/service/IFileService.java
@@ -1,8 +1,16 @@
package com.dji.sample.media.service;
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;
/**
@@ -14,6 +22,7 @@
    /**
     * Query if the file already exists based on the workspace id and the fingerprint of the file.
     *
     * @param workspaceId
     * @param fingerprint
     * @return
@@ -22,16 +31,66 @@
    /**
     * Save the basic information of the file to the database.
     *
     * @param workspaceId
     * @param file
     * @return
     */
    Integer saveFile(String workspaceId, FileUploadDTO file);
    void saveMarkFile(String workspaceId, FileUploadDTO file) throws IOException, FontFormatException, ImageProcessingException;
    Object mediaInfo(String fileId);
    /**
     * Query information about all files in this workspace based on the workspace id.
     *
     * @param workspaceId
     * @return
     */
    List<MediaFileDTO> getAllFilesByWorkspaceId(String workspaceId);
    List<MediaFileEntity> listByIsadd(String dkbh,String workspaceId);
    ResponseResult updateExamByFileId(String fileId);
    List<MediaFileEntity> listMediaFileEntity(String workspaceId, String jobId);
    /**
     * Paginate through all media files in this workspace.
     *
     * @param workspaceId
     * @param page
     * @param pageSize
     * @return
     */
    PaginationData<MediaFileEntity> 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<MediaFileDTO> getFilesByWorkspaceAndJobId(String workspaceId, String jobId);
    /**
     * 更新文件
     *
     * @param workspaceId     项目id
     * @param mediaFileEntity
     * @return
     */
    Boolean updateMediaFile(String workspaceId, MediaFileEntity mediaFileEntity);
    int deleteMedia(String workspaceId, String fileId);
}