|
@@ -0,0 +1,38 @@
|
|
|
+package com.zanxiang.manage.controller;
|
|
|
+
|
|
|
+import com.zanxiang.common.domain.ResultVo;
|
|
|
+import com.zanxiang.module.oss.service.IOssService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiResponse;
|
|
|
+import io.swagger.annotations.ApiResponses;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+
|
|
|
+ * @author : lingfeng
|
|
|
+ * @time : 2022-07-12
|
|
|
+ * @description : oss相关接口
|
|
|
+ */
|
|
|
+@Api(tags = {"oss相关接口管理"})
|
|
|
+@RestController
|
|
|
+@RequestMapping("/oss")
|
|
|
+@Slf4j
|
|
|
+public class OssController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IOssService ossService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "文件上传oss")
|
|
|
+ @GetMapping(value = "/form/upload/")
|
|
|
+ @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Map.class)})
|
|
|
+ public ResultVo<Map<String, String>> formUpload(String filePrefix, String mime) {
|
|
|
+ return new ResultVo<>(ossService.formUpload(filePrefix, mime));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|