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);
|
// }
|
|
}
|