From d23916ec6ac90b10dd7bc75df9927b461aa51fda Mon Sep 17 00:00:00 2001 From: chenxudong Date: Tue, 14 Jan 2025 10:25:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9D=83=E9=99=90=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../software/manage/controller/EdFileInfoController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/electrmangnetic/src/main/java/com/electromagnetic/industry/software/manage/controller/EdFileInfoController.java b/electrmangnetic/src/main/java/com/electromagnetic/industry/software/manage/controller/EdFileInfoController.java index 68ca844..526356a 100644 --- a/electrmangnetic/src/main/java/com/electromagnetic/industry/software/manage/controller/EdFileInfoController.java +++ b/electrmangnetic/src/main/java/com/electromagnetic/industry/software/manage/controller/EdFileInfoController.java @@ -29,6 +29,7 @@ public class EdFileInfoController { return edFileInfoService.tree(); } + @RequiredPermission(value = FilePermission.EDIT) @RequestMapping("createFolder") public ElectromagneticResult createFolder(@RequestBody CreateFolderDTO createFolderDTO) { return edFileInfoService.createFolder(createFolderDTO); @@ -86,16 +87,19 @@ public class EdFileInfoController { return edFileInfoService.versionView(fileId); } + @RequiredPermission(value = FilePermission.EDIT) @RequestMapping("versionBack") public ElectromagneticResult versionBack(@RequestParam String fileId, @RequestParam int targetVersion) { return edFileInfoService.versionBack(fileId, targetVersion); } + @RequiredPermission(value = FilePermission.EXPORT) @RequestMapping("batchExport") public ResponseEntity batchExport(@RequestParam String fileIds, HttpServletResponse response) throws IOException { return edFileInfoService.batchExport(fileIds, response); } + @RequiredPermission(value = FilePermission.IMPORT) @RequestMapping(value = "/mergeChunks", method = RequestMethod.GET) public ElectromagneticResult mergeChunks(@RequestParam String identifier, @RequestParam String fileName, @@ -103,11 +107,13 @@ public class EdFileInfoController { return edFileInfoService.mergeChunks(identifier, fileName, totalChunks); } + @RequiredPermission(value = FilePermission.IMPORT) @RequestMapping(value = "/batchImport", method = RequestMethod.POST) public ElectromagneticResult batchImport(FileChunkDTO fileChunkDTO) { return edFileInfoService.batchImport(fileChunkDTO); } + @RequiredPermission(value = FilePermission.IMPORT) @RequestMapping(value = "/batchImport", method = RequestMethod.GET) public ElectromagneticResult checkChunkExist(FileChunkDTO fileChunkDTO) { return edFileInfoService.checkChunkExist(fileChunkDTO);