郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
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
package com.gkhy.safePlatform.specialWork.controller;
 
import com.alibaba.fastjson.JSONObject;
import com.gkhy.safePlatform.commons.enums.ResultCodes;
import com.gkhy.safePlatform.commons.vo.ResultVO;
import com.gkhy.safePlatform.specialWork.service.SpecialWorkMinoService;
import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
/**
 * 特殊作业文件
 */
@RestController
@RequestMapping("specialWork/file")
public class SpecialWorkMinoController {
 
    @Autowired
    private SpecialWorkMinoService specialWorkMinoService;
 
 
 
    /**
     * 获取上传路径
     */
    @RequestMapping(value = "/getPresignUrl",method = RequestMethod.POST)
    public ResultVO getPresignUrl(@RequestBody JSONObject json) {
        String suffixName = json.getString("suffixName");
        return specialWorkMinoService.getPresignUrl(suffixName);
    }
 
    /**
     * 查看下载
     */
    @RequestMapping(value = "/viewFile",method = RequestMethod.POST)
    public ResultVO viewFile(@RequestBody JSONObject json) {
        String fileName = json.getString("fileName");
        return specialWorkMinoService.viewFile(fileName);
    }
 
    /**
     * 删除
     */
    @RequestMapping(value = "/deleteFile",method = RequestMethod.POST)
    public ResultVO deleteFile(@RequestBody JSONObject json) {
        String fileName = json.getString("fileName");
        return specialWorkMinoService.deleteFile(fileName);
    }
    /**
     * 批量获取图片路劲
     */
//    @RequestMapping(value = "/viewFiles",method = RequestMethod.POST)
//    public String viewFiles(@RequestBody JSONObject json) {
//        String fileNames = json.getString("fileNames");
//        return specialWorkMinoService.viewFiles(fileNames);
//    }
 
}