|
@@ -1,5 +1,6 @@
|
|
|
package com.example.fms.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.example.fms.common.utils.Response;
|
|
|
import com.example.fms.domain.SystemFile;
|
|
|
import com.example.fms.service.FileMangerService;
|
|
@@ -38,6 +39,13 @@ public class FileMangerController {
|
|
|
return Response.success(insertIds);
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/uploadSystemFile1")
|
|
|
+ @Operation(summary = "上传文件")
|
|
|
+ public String upload(MultipartFile file, Integer sourceId) {
|
|
|
+ System.out.println(file +"------------"+sourceId);
|
|
|
+ return Response.success();
|
|
|
+ }
|
|
|
+
|
|
|
@GetMapping("/downloadSystemFile")
|
|
|
@Operation(summary = "取出文件")
|
|
|
public ResponseEntity<InputStreamResource> download(Integer fileId) throws Exception {
|
|
@@ -50,6 +58,15 @@ public class FileMangerController {
|
|
|
.body(new InputStreamResource(new ByteArrayInputStream(fileData)));
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/getFileData")
|
|
|
+ @Operation(summary = "获取文件信息")
|
|
|
+ public List<SystemFile> getFileData(@RequestBody List<Integer> fileIds){
|
|
|
+ LambdaQueryWrapper<SystemFile> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.in(SystemFile::getId, fileIds);
|
|
|
+ List<SystemFile> systemFiles = systemFileService.list(queryWrapper);
|
|
|
+ return systemFiles;
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("/deleteSystemFile")
|
|
|
@Operation(summary = "删除文件")
|
|
|
public String delete(@RequestBody List<Integer> ids, Integer type){
|