From e8242c8c4b69a52bd49fd0b5b49333e1d227e405 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Fri, 22 Sep 2023 16:45:52 +0800
Subject: [PATCH] Merge branch 'cjl' of http://blit.7drlb.com:8888/r/moral into wb

---
 screen-api/src/main/java/com/moral/api/controller/FileTableController.java |   64 ++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/screen-api/src/main/java/com/moral/api/controller/FileTableController.java b/screen-api/src/main/java/com/moral/api/controller/FileTableController.java
new file mode 100644
index 0000000..f828235
--- /dev/null
+++ b/screen-api/src/main/java/com/moral/api/controller/FileTableController.java
@@ -0,0 +1,64 @@
+package com.moral.api.controller;
+
+
+import com.moral.api.pojo.vo.file.FileVo;
+import com.moral.api.service.FileTableService;
+import com.moral.constant.ResultMessage;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.web.bind.annotation.*;
+
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * <p>
+ * ��������� ���������������
+ * </p>
+ *
+ * @author moral
+ * @since 2023-09-21
+ */
+@RestController
+@RequestMapping("/file")
+@Api(tags = {"������"})
+public class FileTableController {
+
+    private final FileTableService fileTableService;
+
+    public FileTableController(FileTableService fileTableService) {
+        this.fileTableService = fileTableService;
+    }
+
+
+    @PostMapping("/upload")
+    @ApiOperation("������������")
+    public ResultMessage<FileVo> upload(@RequestParam("file") @ApiParam(name = "file", value = "������������") MultipartFile file,
+                                        @RequestParam("sysCode") @ApiParam(name = "sysCode", value = "������������") Integer sysCode){
+        return ResultMessage.ok(fileTableService.upload(file,sysCode));
+    }
+
+    @PostMapping("/multipleUpload")
+    @ApiOperation("���������������������")
+    public ResultMessage<List<FileVo>> upload(@RequestParam("file") @ApiParam(name = "file", value = "������������") List<MultipartFile> file,
+                                              @RequestParam("sysCode") @ApiParam(name = "sysCode", value = "������������") Integer sysCode){
+        return ResultMessage.ok(fileTableService.upload(file,sysCode));
+    }
+
+    @GetMapping("/preview/{id}")
+    @ApiOperation("������������")
+    public void preview(@PathVariable("id") Integer id, HttpServletRequest request, HttpServletResponse response) {
+        fileTableService.preview(id, request, response);
+    }
+
+    @GetMapping("/preview/cover/{id}")
+    @ApiOperation("������������������")
+    public void coverPreview(@PathVariable("id") Integer id, HttpServletRequest request, HttpServletResponse response) {
+        fileTableService.coverPreview(id, request, response);
+    }
+
+}

--
Gitblit v1.8.0