package com.jwipc.sys.logic;

import cn.hutool.core.lang.Pair;
import com.jwipc.sys.dto.FileResposeDTO;
import com.jwipc.sys.dto.FileResposePreviewDTO;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * <p> </p>
 *
 * @author BOGON
 * @version 1.0
 * @since JDK 1.8
 */
public interface FileLogic {
    FileResposeDTO uploadFile(MultipartFile file);

    String hash(MultipartFile file);

    FileResposeDTO getForDownload(Long fileId);

    FileResposeDTO getForDownload1(Long fileId);

    List<FileResposeDTO> getForDownloads(Collection<? extends Serializable> idList);

    List<FileResposeDTO> uploadFiles(MultipartFile[] files);

    List<FileResposeDTO> getFileListByFileIds(String fileIds);

    String zipFiles(String zipFileName, Collection<? extends Serializable> idList);

    List<FileResposePreviewDTO> getPreviewUrl(Collection<? extends Serializable> idList);

    FileResposeDTO saveSignFile(File file);

    Pair<String, String> genDatePath();

    Pair<String, String> genBarDatePath();

    /**
     * 创建一个空文件
     *
     * @param fileName 文件名称
     * @return 文件
     */
    File createFile(String fileName);
    File createBarFile(String fileName);

    String getFilePath();

    void deleteFile(List<Long> fileIds);
}