zhaowenyu
2026-04-01 b8b5a3895e741d5348ecdd39ad2e5cbd443f8e89
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.ard.inspection.service;
 
 
import com.ard.common.core.domain.AjaxResult;
import com.ard.inspection.domain.UploadFileEntity;
import org.springframework.web.multipart.MultipartFile;
 
import java.util.Map;
 
public interface IBigFileUploadService {
 
    /**
     * 检查分片是否存在
     *
     * @param fileMd5 fileMd5
     * @param chunkPath 切片临时目录
     */
    public Map<String, Object> checkChunk(String fileMd5, String chunkPath);
 
    /**
     * 上传分片
     *
     * @param file 文件
     * @param chunkNumber chunkNumber
     * @param fileMd5 fileMd5
     * @param chunkPath 切片临时目录
     */
    public Map<String, Object> uploadChunk(MultipartFile file,
                              Integer chunkNumber,
                              String fileMd5,
                              String chunkPath);
 
    public Map<String, Object> uploadChunk(MultipartFile file,
                                           UploadFileEntity uploadFileEntity,
                                           String chunkPath);
 
    /**
     * 合并切片
     *
     * @param md5 文件MD5
     * @param fileName 原始文件名
     * @param uploadPath 上传文件存储路径
     */
    public Map<String, Object> mergeChunks(String md5,
                                           String fileName,
                                           String uploadPath);
 
    /**
     * 大文件上传并解压接口
     * @param file 上传的ZIP文件
     * @param overwrite 是否覆盖已存在文件(默认false)
     * @param uploadPath 上传文件存储路径
     * @param chunkPath 临时切片存储路径
     * @param zipPath 解压文件存储路径
     * @return 上传结果
     */
    public AjaxResult uploadBigZipFile(MultipartFile file,
                                       boolean overwrite,
                                       String uploadPath,
                                       String chunkPath,
                                       String zipPath);
 
}