|
@@ -0,0 +1,38 @@
|
|
|
+package com.caimei.controller.admin.auth;
|
|
|
+
|
|
|
+import com.caimei.model.vo.FileTreeVo;
|
|
|
+import com.caimei.service.data.DatabaseService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.io.IOException;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author zzj
|
|
|
+ */
|
|
|
+@Api(tags = "资料库Api")
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@RequiredArgsConstructor
|
|
|
+@RequestMapping("/database")
|
|
|
+public class DatabaseApi {
|
|
|
+
|
|
|
+ private final DatabaseService databaseService;
|
|
|
+
|
|
|
+ @ApiOperation("获取当前路径下文件")
|
|
|
+ @ApiImplicitParam(name = "fileId",value = "文件Id")
|
|
|
+ @GetMapping("/path/file")
|
|
|
+ public FileTreeVo getFileById(Integer fileId) {
|
|
|
+ return databaseService.getFileById(fileId);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|