|
|
@@ -1,9 +1,11 @@
|
|
|
package cn.reghao.oss.console.app.controller.page;
|
|
|
|
|
|
import cn.reghao.jutil.jdk.result.WebResult;
|
|
|
+import cn.reghao.oss.api.dto.FileInfo;
|
|
|
import cn.reghao.oss.api.iface.ConsoleService;
|
|
|
import cn.reghao.oss.console.account.service.UserContext;
|
|
|
import cn.reghao.oss.api.dto.ServerInfo;
|
|
|
+import cn.reghao.oss.console.app.service.DiskFileService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
@@ -11,6 +13,8 @@ import org.springframework.ui.Model;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @author reghao
|
|
|
* @date 2024-02-27 09:12:14
|
|
|
@@ -20,9 +24,11 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
@RequestMapping("/store/object")
|
|
|
public class StoreObjectPageController {
|
|
|
private final ConsoleService consoleService;
|
|
|
+ private DiskFileService diskFileService;
|
|
|
|
|
|
- public StoreObjectPageController(ConsoleService consoleService) {
|
|
|
+ public StoreObjectPageController(ConsoleService consoleService, DiskFileService diskFileService) {
|
|
|
this.consoleService = consoleService;
|
|
|
+ this.diskFileService = diskFileService;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "文件列表页面")
|
|
|
@@ -30,6 +36,11 @@ public class StoreObjectPageController {
|
|
|
public String index(@RequestParam(value = "env", required = false) String env,
|
|
|
@RequestParam(value = "type", required = false) String type,
|
|
|
@RequestParam(value = "appName", required = false) String appName, Model model) throws Exception {
|
|
|
+
|
|
|
+ int pageNumber = 1;
|
|
|
+ List<FileInfo> list = diskFileService.getFileList(pageNumber);
|
|
|
+
|
|
|
+ model.addAttribute("list", list);
|
|
|
return "/object/index";
|
|
|
}
|
|
|
|