From 000604dc89ee83bca3f6646fe0565086b1b2f5e6 Mon Sep 17 00:00:00 2001 From: weizhiqiang <> Date: Wed, 6 Jul 2022 18:37:44 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E3=80=91=E4=BF=AE=E6=94=B9=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skyeye-promote/skyeye-disk-cloud/pom.xml | 42 +-- .../eve/controller/FileConsoleController.java | 127 ++++---- .../com/skyeye/eve/dao/FileConsoleDao.java | 130 ++++---- .../eve/service/FileConsoleService.java | 74 ++--- .../service/impl/FileConsoleServiceImpl.java | 286 +++++++++--------- .../mapper/diskcloud/FileConsoleMapper.xml | 4 +- .../reqmapping/mapping/diskcloud.xml | 9 - .../filerecycle/FileRecycleQueryDo.java | 30 ++ .../diskcloud/fileshare/FileShareQueryDo.java | 34 +++ 9 files changed, 367 insertions(+), 369 deletions(-) create mode 100644 skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/diskcloud/filerecycle/FileRecycleQueryDo.java create mode 100644 skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/diskcloud/fileshare/FileShareQueryDo.java diff --git a/skyeye-promote/skyeye-disk-cloud/pom.xml b/skyeye-promote/skyeye-disk-cloud/pom.xml index e449e549..5aef82e0 100644 --- a/skyeye-promote/skyeye-disk-cloud/pom.xml +++ b/skyeye-promote/skyeye-disk-cloud/pom.xml @@ -19,50 +19,18 @@ - + com.skyeye - skyeye-common + skyeye-entity 0.0.1-SNAPSHOT - - - - org.openoffice - juh - 4.1.2 - - - org.openoffice - jurt - 4.1.2 - - - org.openoffice - ridl - 4.1.2 - - - org.openoffice - unoil - 4.1.2 - - - com.thoughtworks.xstream - xstream - 1.4.10 - - - com.artofsolving - jodconverter - 2.2.1 - - + epublib-core - latest - 1.3.1 + latest + 1.3.1 system ${basedir}/lib/epublib-core-latest.jar diff --git a/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/controller/FileConsoleController.java b/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/controller/FileConsoleController.java index a830d4d4..6ac3bdd5 100644 --- a/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/controller/FileConsoleController.java +++ b/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/controller/FileConsoleController.java @@ -10,14 +10,24 @@ import com.skyeye.annotation.api.ApiImplicitParams; import com.skyeye.annotation.api.ApiOperation; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; +import com.skyeye.eve.entity.diskcloud.filerecycle.FileRecycleQueryDo; +import com.skyeye.eve.entity.diskcloud.fileshare.FileShareQueryDo; import com.skyeye.eve.service.FileConsoleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; +/** + * @ClassName: SysWorkPlanController + * @Description: 文件管理--云盘 + * @author: skyeye云系列--卫志强 + * @date: 2022/6/30 22:26 + * @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved. + * 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的 + */ @RestController -@Api(value = "文件管理", tags = "文件管理", modelName = "文件模块") +@Api(value = "文件管理--云盘", tags = "文件管理--云盘", modelName = "文件模块") public class FileConsoleController { @Autowired @@ -28,10 +38,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryFileFolderByUserId") - public void queryFileFolderByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFileFolderByUserId(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryFileFolderByUserId(inputObject, outputObject); } @@ -40,10 +49,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertFileFolderByUserId") - public void insertFileFolderByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileFolderByUserId(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertFileFolderByUserId(inputObject, outputObject); } @@ -52,10 +60,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryFilesListByFolderId") - public void queryFilesListByFolderId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFilesListByFolderId(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryFilesListByFolderId(inputObject, outputObject); } @@ -64,13 +71,12 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @ApiOperation(id = "fileconsole004", value = "删除目录以及目录下的所有文件", method = "POST", allUse = "2") @ApiImplicitParams({ @ApiImplicitParam(id = "fileList", name = "fileList", value = "要删除的目录id集合,包含rowId,fileType", required = "required,json")}) @RequestMapping("/post/FileConsoleController/deleteFileFolderById") - public void deleteFileFolderById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void deleteFileFolderById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.deleteFileFolderById(inputObject, outputObject); } @@ -79,10 +85,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/editFileFolderById") - public void editFileFolderById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void editFileFolderById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.editFileFolderById(inputObject, outputObject); } @@ -91,10 +96,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertUploadFileByUserId") - public void insertUploadFileByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertUploadFileByUserId(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertUploadFileByUserId(inputObject, outputObject); } @@ -103,10 +107,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertUploadFileChunksByUserId") - public void insertUploadFileChunksByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertUploadFileChunksByUserId(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertUploadFileChunksByUserId(inputObject, outputObject); } @@ -115,10 +118,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryUploadFileChunksByChunkMd5") - public void queryUploadFileChunksByChunkMd5(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryUploadFileChunksByChunkMd5(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryUploadFileChunksByChunkMd5(inputObject, outputObject); } @@ -127,10 +129,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryUploadFilePathById") - public void queryUploadFilePathById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryUploadFilePathById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryUploadFilePathById(inputObject, outputObject); } @@ -139,10 +140,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping(value = "/post/FileConsoleController/editUploadOfficeFileById", method = RequestMethod.POST) - public void editUploadOfficeFileById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void editUploadOfficeFileById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.editUploadOfficeFileById(inputObject, outputObject); } @@ -151,10 +151,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryAllFileSizeByUserId") - public void queryAllFileSizeByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryAllFileSizeByUserId(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryAllFileSizeByUserId(inputObject, outputObject); } @@ -163,10 +162,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertFileCatalogToRecycleById") - public void insertFileCatalogToRecycleById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileCatalogToRecycleById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertFileCatalogToRecycleById(inputObject, outputObject); } @@ -175,10 +173,11 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ + @ApiOperation(id = "fileconsole014", value = "我的回收站", method = "POST", allUse = "2") + @ApiImplicitParams(classBean = FileRecycleQueryDo.class) @RequestMapping("/post/FileConsoleController/queryFileRecycleBinByUserId") - public void queryFileRecycleBinByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFileRecycleBinByUserId(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryFileRecycleBinByUserId(inputObject, outputObject); } @@ -187,10 +186,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/deleteFileRecycleBinById") - public void deleteFileRecycleBinById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void deleteFileRecycleBinById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.deleteFileRecycleBinById(inputObject, outputObject); } @@ -199,10 +197,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertFileToShareById") - public void insertFileToShareById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileToShareById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertFileToShareById(inputObject, outputObject); } @@ -211,10 +208,11 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ + @ApiOperation(id = "fileconsole017", value = "我的文件分享列表", method = "POST", allUse = "2") + @ApiImplicitParams(classBean = FileShareQueryDo.class) @RequestMapping("/post/FileConsoleController/queryShareFileListByUserId") - public void queryShareFileListByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryShareFileListByUserId(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryShareFileListByUserId(inputObject, outputObject); } @@ -223,10 +221,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/deleteShareFileById") - public void deleteShareFileById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void deleteShareFileById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.deleteShareFileById(inputObject, outputObject); } @@ -235,10 +232,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryShareFileMationById") - public void queryShareFileMationById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryShareFileMationById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryShareFileMationById(inputObject, outputObject); } @@ -247,10 +243,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryShareFileMationCheckById") - public void queryShareFileMationCheckById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryShareFileMationCheckById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryShareFileMationCheckById(inputObject, outputObject); } @@ -259,10 +254,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryShareFileBaseMationById") - public void queryShareFileBaseMationById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryShareFileBaseMationById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryShareFileBaseMationById(inputObject, outputObject); } @@ -271,10 +265,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryShareFileListByParentId") - public void queryShareFileListByParentId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryShareFileListByParentId(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryShareFileListByParentId(inputObject, outputObject); } @@ -283,10 +276,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertShareFileListToSave") - public void insertShareFileListToSave(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertShareFileListToSave(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertShareFileListToSave(inputObject, outputObject); } @@ -295,10 +287,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryFileToShowById") - public void queryFileToShowById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFileToShowById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryFileToShowById(inputObject, outputObject); } @@ -307,10 +298,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertWordFileToService") - public void insertWordFileToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertWordFileToService(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertWordFileToService(inputObject, outputObject); } @@ -319,10 +309,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertExcelFileToService") - public void insertExcelFileToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertExcelFileToService(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertExcelFileToService(inputObject, outputObject); } @@ -331,10 +320,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertPPTFileToService") - public void insertPPTFileToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertPPTFileToService(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertPPTFileToService(inputObject, outputObject); } @@ -343,10 +331,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertTXTFileToService") - public void insertTXTFileToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertTXTFileToService(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertTXTFileToService(inputObject, outputObject); } @@ -355,10 +342,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertHtmlFileToService") - public void insertHtmlFileToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertHtmlFileToService(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertHtmlFileToService(inputObject, outputObject); } @@ -367,10 +353,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertDuplicateCopyToService") - public void insertDuplicateCopyToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertDuplicateCopyToService(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertDuplicateCopyToService(inputObject, outputObject); } @@ -379,10 +364,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryFileMationById") - public void queryFileMationById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFileMationById(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryFileMationById(inputObject, outputObject); } @@ -391,10 +375,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertFileMationToPackageToFolder") - public void insertFileMationToPackageToFolder(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileMationToPackageToFolder(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertFileMationToPackageToFolder(inputObject, outputObject); } @@ -403,10 +386,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertFileMationPackageToFolder") - public void insertFileMationPackageToFolder(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileMationPackageToFolder(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertFileMationPackageToFolder(inputObject, outputObject); } @@ -415,10 +397,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertPasteCopyToService") - public void insertPasteCopyToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertPasteCopyToService(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertPasteCopyToService(inputObject, outputObject); } @@ -427,10 +408,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertPasteCutToService") - public void insertPasteCutToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertPasteCutToService(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertPasteCutToService(inputObject, outputObject); } @@ -439,10 +419,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryOfficeUpdateTimeToKey") - public void queryOfficeUpdateTimeToKey(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryOfficeUpdateTimeToKey(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryOfficeUpdateTimeToKey(inputObject, outputObject); } @@ -451,10 +430,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/queryFileNumStatistics") - public void queryFileNumStatistics(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFileNumStatistics(InputObject inputObject, OutputObject outputObject) { fileConsoleService.queryFileNumStatistics(inputObject, outputObject); } @@ -463,10 +441,9 @@ public class FileConsoleController { * * @param inputObject * @param outputObject - * @throws Exception */ @RequestMapping("/post/FileConsoleController/insertFileMationToPackageDownload") - public void insertFileMationToPackageDownload(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileMationToPackageDownload(InputObject inputObject, OutputObject outputObject) { fileConsoleService.insertFileMationToPackageDownload(inputObject, outputObject); } diff --git a/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/dao/FileConsoleDao.java b/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/dao/FileConsoleDao.java index 83d34fc4..637e883f 100644 --- a/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/dao/FileConsoleDao.java +++ b/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/dao/FileConsoleDao.java @@ -4,6 +4,8 @@ package com.skyeye.eve.dao; +import com.skyeye.eve.entity.diskcloud.filerecycle.FileRecycleQueryDo; +import com.skyeye.eve.entity.diskcloud.fileshare.FileShareQueryDo; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -11,31 +13,31 @@ import java.util.Map; public interface FileConsoleDao { - public int insertFileFolderByUserId(Map map) throws Exception; + int insertFileFolderByUserId(Map map); - public List> queryFileFolderByUserIdAndParentId(Map map); + List> queryFileFolderByUserIdAndParentId(Map map); - public List> queryFilesListByFolderId(Map map) throws Exception; + List> queryFilesListByFolderId(Map map); - public int deleteFileFolderById(String id) throws Exception; + int deleteFileFolderById(String id); - public int editFileFolderById(Map map) throws Exception; + int editFileFolderById(Map map); - public int insertUploadFileByUserId(Map map) throws Exception; + int insertUploadFileByUserId(Map map); - public int editFilePaperNameById(Map map) throws Exception; + int editFilePaperNameById(Map map); - public int deleteFilePaperById(String id) throws Exception; + int deleteFilePaperById(String id); - public Map queryFilePaperPathById(String id) throws Exception; + Map queryFilePaperPathById(String id); - public Map queryUploadFileChunksByChunkMd5(Map map) throws Exception; + Map queryUploadFileChunksByChunkMd5(Map map); - public List> queryUploadFileChunksByMd5(Map map) throws Exception; + List> queryUploadFileChunksByMd5(Map map); - public int deleteUploadFileChunksByMd5(Map map) throws Exception; + int deleteUploadFileChunksByMd5(Map map); - public Map queryUploadFilePathById(Map map) throws Exception; + Map queryUploadFilePathById(Map map); /** * 根据文件夹id获取文件夹信息 @@ -44,7 +46,7 @@ public interface FileConsoleDao { * @return 文件夹信息 * @throws Exception */ - public Map queryFolderMationById(@Param("folderId") String folderId) throws Exception; + Map queryFolderMationById(@Param("folderId") String folderId); /** * 根据文件夹id获取该文件夹下的所有文件(包含子文件夹中的文件) @@ -53,104 +55,104 @@ public interface FileConsoleDao { * @return 该文件夹下的所有文件 * @throws Exception */ - public List> queryFilesByFolderId(@Param("id") String id) throws Exception; + List> queryFilesByFolderId(@Param("id") String id); - public int deleteFilesByFolderId(String id) throws Exception; + int deleteFilesByFolderId(String id); - public int deleteFolderChildByFolderId(String id) throws Exception; + int deleteFolderChildByFolderId(String id); - public int deleteUploadFileChunksByChunkMd5(Map map) throws Exception; + int deleteUploadFileChunksByChunkMd5(Map map); - public Map queryUploadFilePathByKey(Map map) throws Exception; + Map queryUploadFilePathByKey(Map map); - public Map queryAllFileSizeByUserId(Map map) throws Exception; + Map queryAllFileSizeByUserId(Map map); - public Map queryFileCatalogByUserIdAndId(Map map) throws Exception; + Map queryFileCatalogByUserIdAndId(Map map); - public int insertFileCatalogToRecycleById(Map map) throws Exception; + int insertFileCatalogToRecycleById(Map map); - public List> queryFileRecycleBinByUserId(Map map) throws Exception; + List> queryFileRecycleBinByUserId(FileRecycleQueryDo fileRecycleQuery); - public Map queryFileRecycleBinById(Map map) throws Exception; + Map queryFileRecycleBinById(Map map); - public int deleteFileRecycleBinById(Map map) throws Exception; + int deleteFileRecycleBinById(Map map); - public int updateFileFolderRecycleBinById(Map map) throws Exception; + int updateFileFolderRecycleBinById(Map map); - public int updateFileRecycleBinById(Map map) throws Exception; + int updateFileRecycleBinById(Map map); - public Map queryThisFileCreaterByFileId(String id) throws Exception; + Map queryThisFileCreaterByFileId(String id); - public int updateFileStateIsDeleteById(Map map) throws Exception; + int updateFileStateIsDeleteById(Map map); - public Map queryFileMationByIdAndUserId(Map map) throws Exception; + Map queryFileMationByIdAndUserId(Map map); - public int insertFileToShareById(Map map) throws Exception; + int insertFileToShareById(Map map); - public List> queryShareFileListByUserId(Map map) throws Exception; + List> queryShareFileListByUserId(FileShareQueryDo fileShareQuery); - public int deleteShareFileById(Map map) throws Exception; + int deleteShareFileById(Map map); - public Map queryShareFileMationById(Map map) throws Exception; + Map queryShareFileMationById(Map map); - public Map queryShareFileMationCheckById(Map map) throws Exception; + Map queryShareFileMationCheckById(Map map); - public Map queryShareFileBaseMationById(Map map) throws Exception; + Map queryShareFileBaseMationById(Map map); - public List> queryShareFileFirstListByParentId(Map map) throws Exception; + List> queryShareFileFirstListByParentId(Map map); - public List> queryShareFileListByParentId(Map map) throws Exception; + List> queryShareFileListByParentId(Map map); - public List> queryShareFileFolderListByList(List> folderBeans) throws Exception; + List> queryShareFileFolderListByList(List> folderBeans); - public List> queryShareFileListByList(List> folderNew) throws Exception; + List> queryShareFileListByList(List> folderNew); - public int insertShareFileFolderListByList(List> folderNew) throws Exception; + int insertShareFileFolderListByList(List> folderNew); - public int insertShareFileListByList(List> fileNew) throws Exception; + int insertShareFileListByList(List> fileNew); - public List> queryShareFileListByFileList(List> fileBeans) throws Exception; + List> queryShareFileListByFileList(List> fileBeans); - public Map quertWinFileOrFolderParentById(String id) throws Exception; + Map quertWinFileOrFolderParentById(String id); - public Map queryFileToShowById(Map map) throws Exception; + Map queryFileToShowById(Map map); - public Map queryFileMationById(Map map) throws Exception; + Map queryFileMationById(Map map); - public List> queryToPackageFileFolderListByList(List> folderBeans) throws Exception; + List> queryToPackageFileFolderListByList(List> folderBeans); - public List> queryToPackageFileListByList(List> folderNew) throws Exception; + List> queryToPackageFileListByList(List> folderNew); - public List> queryToPackageFileListByFileList(List> fileBeans) throws Exception; + List> queryToPackageFileListByFileList(List> fileBeans); - public Map queryFilePackageMationById(Map map) throws Exception; + Map queryFilePackageMationById(Map map); - public int insertFolderByPackageAndUserId(List> folderList) throws Exception; + int insertFolderByPackageAndUserId(List> folderList); - public int insertFileByPackageAndUserId(List> fileList) throws Exception; + int insertFileByPackageAndUserId(List> fileList); - public int deleteShareFileFolderListByList(List> folderBeans) throws Exception; + int deleteShareFileFolderListByList(List> folderBeans); - public int deleteShareFileListByList(List> folderNew) throws Exception; + int deleteShareFileListByList(List> folderNew); - public int deleteShareFileListByFileList(List> fileBeans) throws Exception; + int deleteShareFileListByFileList(List> fileBeans); - public int editFileUpdateTimeByKey(Map map) throws Exception; + int editFileUpdateTimeByKey(Map map); - public Map queryOfficeUpdateTimeToKey(Map map) throws Exception; + Map queryOfficeUpdateTimeToKey(Map map); - public Map queryAllNumFile(Map map) throws Exception; + Map queryAllNumFile(Map map); - public Map queryAllNumFileToday(Map map) throws Exception; + Map queryAllNumFileToday(Map map); - public Map queryAllNumFileThisWeek(Map map) throws Exception; + Map queryAllNumFileThisWeek(Map map); - public List> queryFileTypeNum(Map map) throws Exception; + List> queryFileTypeNum(Map map); - public List> queryFileStorageNum(Map map) throws Exception; + List> queryFileStorageNum(Map map); - public List> queryNewFileNum(Map map) throws Exception; + List> queryNewFileNum(Map map); - public List> queryFileTypeNumSevenDay(Map map) throws Exception; + List> queryFileTypeNumSevenDay(Map map); } diff --git a/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/service/FileConsoleService.java b/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/service/FileConsoleService.java index aafc0635..50598f6d 100644 --- a/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/service/FileConsoleService.java +++ b/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/service/FileConsoleService.java @@ -8,78 +8,78 @@ import com.skyeye.common.object.OutputObject; public interface FileConsoleService { - public void queryFileFolderByUserId(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryFileFolderByUserId(InputObject inputObject, OutputObject outputObject); - public void insertFileFolderByUserId(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertFileFolderByUserId(InputObject inputObject, OutputObject outputObject); - public void queryFilesListByFolderId(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryFilesListByFolderId(InputObject inputObject, OutputObject outputObject); - public void deleteFileFolderById(InputObject inputObject, OutputObject outputObject) throws Exception; + void deleteFileFolderById(InputObject inputObject, OutputObject outputObject); - public void editFileFolderById(InputObject inputObject, OutputObject outputObject) throws Exception; + void editFileFolderById(InputObject inputObject, OutputObject outputObject); - public void insertUploadFileByUserId(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertUploadFileByUserId(InputObject inputObject, OutputObject outputObject); - public void insertUploadFileChunksByUserId(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertUploadFileChunksByUserId(InputObject inputObject, OutputObject outputObject); - public void queryUploadFileChunksByChunkMd5(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryUploadFileChunksByChunkMd5(InputObject inputObject, OutputObject outputObject); - public void queryUploadFilePathById(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryUploadFilePathById(InputObject inputObject, OutputObject outputObject); - public void editUploadOfficeFileById(InputObject inputObject, OutputObject outputObject) throws Exception; + void editUploadOfficeFileById(InputObject inputObject, OutputObject outputObject); - public void queryAllFileSizeByUserId(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryAllFileSizeByUserId(InputObject inputObject, OutputObject outputObject); - public void insertFileCatalogToRecycleById(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertFileCatalogToRecycleById(InputObject inputObject, OutputObject outputObject); - public void queryFileRecycleBinByUserId(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryFileRecycleBinByUserId(InputObject inputObject, OutputObject outputObject); - public void deleteFileRecycleBinById(InputObject inputObject, OutputObject outputObject) throws Exception; + void deleteFileRecycleBinById(InputObject inputObject, OutputObject outputObject); - public void insertFileToShareById(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertFileToShareById(InputObject inputObject, OutputObject outputObject); - public void queryShareFileListByUserId(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryShareFileListByUserId(InputObject inputObject, OutputObject outputObject); - public void deleteShareFileById(InputObject inputObject, OutputObject outputObject) throws Exception; + void deleteShareFileById(InputObject inputObject, OutputObject outputObject); - public void queryShareFileMationById(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryShareFileMationById(InputObject inputObject, OutputObject outputObject); - public void queryShareFileMationCheckById(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryShareFileMationCheckById(InputObject inputObject, OutputObject outputObject); - public void queryShareFileBaseMationById(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryShareFileBaseMationById(InputObject inputObject, OutputObject outputObject); - public void queryShareFileListByParentId(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryShareFileListByParentId(InputObject inputObject, OutputObject outputObject); - public void insertShareFileListToSave(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertShareFileListToSave(InputObject inputObject, OutputObject outputObject); - public void queryFileToShowById(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryFileToShowById(InputObject inputObject, OutputObject outputObject); - public void insertWordFileToService(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertWordFileToService(InputObject inputObject, OutputObject outputObject); - public void insertExcelFileToService(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertExcelFileToService(InputObject inputObject, OutputObject outputObject); - public void insertPPTFileToService(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertPPTFileToService(InputObject inputObject, OutputObject outputObject); - public void insertTXTFileToService(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertTXTFileToService(InputObject inputObject, OutputObject outputObject); - public void insertHtmlFileToService(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertHtmlFileToService(InputObject inputObject, OutputObject outputObject); - public void insertDuplicateCopyToService(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertDuplicateCopyToService(InputObject inputObject, OutputObject outputObject); - public void queryFileMationById(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryFileMationById(InputObject inputObject, OutputObject outputObject); - public void insertFileMationToPackageToFolder(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertFileMationToPackageToFolder(InputObject inputObject, OutputObject outputObject); - public void insertFileMationPackageToFolder(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertFileMationPackageToFolder(InputObject inputObject, OutputObject outputObject); - public void insertPasteCopyToService(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertPasteCopyToService(InputObject inputObject, OutputObject outputObject); - public void insertPasteCutToService(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertPasteCutToService(InputObject inputObject, OutputObject outputObject); - public void queryOfficeUpdateTimeToKey(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryOfficeUpdateTimeToKey(InputObject inputObject, OutputObject outputObject); - public void queryFileNumStatistics(InputObject inputObject, OutputObject outputObject) throws Exception; + void queryFileNumStatistics(InputObject inputObject, OutputObject outputObject); - public void insertFileMationToPackageDownload(InputObject inputObject, OutputObject outputObject) throws Exception; + void insertFileMationToPackageDownload(InputObject inputObject, OutputObject outputObject); } diff --git a/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/service/impl/FileConsoleServiceImpl.java b/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/service/impl/FileConsoleServiceImpl.java index ddb484b1..20547640 100644 --- a/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/service/impl/FileConsoleServiceImpl.java +++ b/skyeye-promote/skyeye-disk-cloud/src/main/java/com/skyeye/eve/service/impl/FileConsoleServiceImpl.java @@ -23,6 +23,8 @@ import com.skyeye.common.util.DateUtil; import com.skyeye.common.util.FileUtil; import com.skyeye.common.util.ToolUtil; import com.skyeye.eve.dao.FileConsoleDao; +import com.skyeye.eve.entity.diskcloud.filerecycle.FileRecycleQueryDo; +import com.skyeye.eve.entity.diskcloud.fileshare.FileShareQueryDo; import com.skyeye.eve.service.FileConsoleService; import com.skyeye.exception.CustomException; import com.skyeye.jedis.JedisClientService; @@ -89,9 +91,8 @@ public class FileConsoleServiceImpl implements FileConsoleService { * 删除指定文件夹或文件的父目录在redis中的缓存信息 * * @param id - * @throws Exception */ - public void deleteParentFolderRedis(String id) throws Exception { + public void deleteParentFolderRedis(String id) { //获取文件或者文件夹父id Map fileParent = fileConsoleDao.quertWinFileOrFolderParentById(id); if (fileParent != null && !fileParent.isEmpty()) { @@ -121,10 +122,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryFileFolderByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFileFolderByUserId(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); // 父目录id String parentId = map.get("parentId").toString(); @@ -147,7 +147,7 @@ public class FileConsoleServiceImpl implements FileConsoleService { } } - private String getFolderType(String folderId) throws Exception { + private String getFolderType(String folderId) { if ("3".equals(folderId)) { // 企业网盘 return DiskCloudConstants.FOLDER_TYPE.ENTERPRISE_NETWORK_DISK.getFolderType(); @@ -173,11 +173,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertFileFolderByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileFolderByUserId(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map user = inputObject.getLogParams(); String parentId = map.get("parentId").toString(); @@ -209,10 +208,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryFilesListByFolderId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFilesListByFolderId(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map user = inputObject.getLogParams(); map.put("userId", user.get("id")); @@ -259,11 +257,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void deleteFileFolderById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void deleteFileFolderById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); //获取要删除的文件 String fileList = map.get("fileList").toString(); @@ -313,11 +310,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void editFileFolderById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void editFileFolderById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); map.put("userId", inputObject.getLogParams().get("id")); //删除父目录在redis的缓存信息 @@ -334,11 +330,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertUploadFileByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertUploadFileByUserId(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); // 将当前上下文初始化给 CommonsMutipartResolver (多部分解析器) CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver(PutObject.getRequest().getSession().getServletContext()); @@ -365,7 +360,11 @@ public class FileConsoleServiceImpl implements FileConsoleService { String newFileName = String.valueOf(System.currentTimeMillis()) + "." + fileExtName; String path = basePath + "/" + newFileName; // 上传 - file.transferTo(new File(path)); + try { + file.transferTo(new File(path)); + } catch (IOException e) { + throw new CustomException(e); + } //初始化文件对象内容 trueFileName = Constants.FileUploadPath.getVisitPath(FILE_PATH_TYPE) + "/" + userId + "/" + newFileName; map.put("fileType", fileExtName);//文件类型 @@ -388,9 +387,8 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param folderId 文件夹id * @return 当前文件夹子文件的parentId - * @throws Exception */ - private String getThisFolderChildParentId(String folderId) throws Exception { + private String getThisFolderChildParentId(String folderId) { // 删除父目录的redis的key jedisClient.delKeys(DiskCloudConstants.SYS_FILE_MATION_FOLDER_LIST_MATION + folderId + "*"); if ("1".equals(folderId) || "2".equals(folderId) || "3".equals(folderId)) { @@ -413,15 +411,14 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertUploadFileChunksByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertUploadFileChunksByUserId(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); String userId = inputObject.getLogParams().get("id").toString(); List> beans = fileConsoleDao.queryUploadFileChunksByMd5(map); - List fileList = new ArrayList(); + List fileList = new ArrayList<>(); File f; for (Map bean : beans) { f = new File(tPath.replace("images", "") + bean.get("fileAddress").toString()); @@ -432,13 +429,14 @@ public class FileConsoleServiceImpl implements FileConsoleService { String newFileName = String.valueOf(System.currentTimeMillis()) + "." + fileExtName;//新文件名 String basePath = tPath + Constants.FileUploadPath.getSavePath(FILE_PATH_TYPE); String path = basePath + "/" + userId + "/" + newFileName;//文件路径 - File outputFile = new File(path); - //创建文件 - outputFile.createNewFile(); - //输出流 - FileChannel outChnnel = new FileOutputStream(outputFile).getChannel(); - //合并 + FileChannel outChnnel = null; try { + File outputFile = new File(path); + // 创建文件 + outputFile.createNewFile(); + // 输出流 + outChnnel = new FileOutputStream(outputFile).getChannel(); + // 合并 FileChannel inChannel; for (File file : fileList) { inChannel = new FileInputStream(file).getChannel(); @@ -447,6 +445,8 @@ public class FileConsoleServiceImpl implements FileConsoleService { //删除分片 file.delete(); } + } catch (Exception ee) { + throw new CustomException(ee); } finally { FileUtil.close(outChnnel); } @@ -465,15 +465,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { if (DiskCloudConstants.FileMation.judgeIsAllowedFileType(fileExtName, 1)) {//图片 map.put("fileThumbnail", trueFileName);//文件缩略图地址 } else if (DiskCloudConstants.FileMation.judgeIsAllowedFileType(fileExtName, 6)) {//电子书 - EpubReader epubReader = new EpubReader(); - Book book = epubReader.readEpub(new FileInputStream(path)); - Resource resource = book.getResources().getByHref("Images/cover.jpg"); - byte[] p = resource.getData(); String picName = String.valueOf(System.currentTimeMillis()) + ".jpg"; String newFilename = basePath + "/" + userId + "/" + picName; - FileImageOutputStream imgout = new FileImageOutputStream(new File(newFilename)); - imgout.write(p, 0, p.length); - imgout.close(); + writeAndReadQpubFileThumbnail(path, newFilename); + map.put("fileThumbnail", Constants.FileUploadPath.getVisitPath(FILE_PATH_TYPE) + userId + "/" + picName);//文件缩略图地址 } else if (DiskCloudConstants.FileMation.judgeIsAllowedFileType(fileExtName, 2)) { // office文件缩略图地址 @@ -507,11 +502,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void queryUploadFileChunksByChunkMd5(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryUploadFileChunksByChunkMd5(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map bean = fileConsoleDao.queryUploadFileChunksByChunkMd5(map); if (bean != null && !bean.isEmpty()) { @@ -533,10 +527,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryUploadFilePathById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryUploadFilePathById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map bean = fileConsoleDao.queryUploadFilePathById(map); outputObject.setBean(bean); @@ -547,39 +540,43 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void editUploadOfficeFileById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void editUploadOfficeFileById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); int status = Integer.parseInt(map.get("status").toString()); // 当我们关闭编辑窗口后,十秒钟左右onlyoffice会将它存储的我们的编辑后的文件,,此时status = 2 if (status == 2 || status == 3) {//MustSave, Corrupted map.put("key", map.get("key").toString().split("-")[0]); - URL url = new URL(map.get("url").toString());//新文件地址 - java.net.HttpURLConnection connection = (java.net.HttpURLConnection) url.openConnection(); - InputStream stream = connection.getInputStream(); - if (stream == null) { - outputObject.setreturnMessage("Stream is null"); - return; - } - // 从请求中获取要覆盖的文件参数定义"path" - Map fileMation = fileConsoleDao.queryUploadFilePathByKey(map); - String fileAddress = tPath.replace("images", "") + fileMation.get("fileAddress").toString(); - File savedFile = new File(fileAddress); - try (FileOutputStream out = new FileOutputStream(savedFile)) { - int read; - final byte[] bytes = new byte[1024]; - while ((read = stream.read(bytes)) != -1) { - out.write(bytes, 0, read); + try { + // 新文件地址 + URL url = new URL(map.get("url").toString()); + java.net.HttpURLConnection connection = (java.net.HttpURLConnection) url.openConnection(); + InputStream stream = connection.getInputStream(); + if (stream == null) { + outputObject.setreturnMessage("Stream is null"); + return; } - out.flush(); + // 从请求中获取要覆盖的文件参数定义"path" + Map fileMation = fileConsoleDao.queryUploadFilePathByKey(map); + String fileAddress = tPath.replace("images", "") + fileMation.get("fileAddress").toString(); + File savedFile = new File(fileAddress); + try (FileOutputStream out = new FileOutputStream(savedFile)) { + int read; + final byte[] bytes = new byte[1024]; + while ((read = stream.read(bytes)) != -1) { + out.write(bytes, 0, read); + } + out.flush(); + } + map.put("updateTime", DateUtil.getTimeAndToString()); + fileConsoleDao.editFileUpdateTimeByKey(map); + connection.disconnect(); + outputObject.setErroCode(1); + } catch (Exception e) { + throw new CustomException(e); } - map.put("updateTime", DateUtil.getTimeAndToString()); - fileConsoleDao.editFileUpdateTimeByKey(map); - connection.disconnect(); - outputObject.setErroCode(1); } } @@ -588,10 +585,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryAllFileSizeByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryAllFileSizeByUserId(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map user = inputObject.getLogParams(); map.put("userId", user.get("id")); @@ -611,11 +607,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertFileCatalogToRecycleById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileCatalogToRecycleById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map user = inputObject.getLogParams(); map.put("userId", user.get("id")); @@ -642,15 +637,13 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryFileRecycleBinByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { - Map map = inputObject.getParams(); - Map user = inputObject.getLogParams(); - map.put("userId", user.get("id")); - Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())); - List> beans = fileConsoleDao.queryFileRecycleBinByUserId(map); + public void queryFileRecycleBinByUserId(InputObject inputObject, OutputObject outputObject) { + FileRecycleQueryDo fileRecycleQuery = inputObject.getParams(FileRecycleQueryDo.class); + fileRecycleQuery.setUserId(inputObject.getLogParams().get("id").toString()); + Page pages = PageHelper.startPage(fileRecycleQuery.getPage(), fileRecycleQuery.getLimit()); + List> beans = fileConsoleDao.queryFileRecycleBinByUserId(fileRecycleQuery); outputObject.setBeans(beans); outputObject.settotal(pages.getTotal()); } @@ -660,10 +653,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void deleteFileRecycleBinById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void deleteFileRecycleBinById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); map.put("userId", inputObject.getLogParams().get("id")); Map mation = fileConsoleDao.queryFileRecycleBinById(map); @@ -690,11 +682,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertFileToShareById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileToShareById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map mation = fileConsoleDao.queryFileMationByIdAndUserId(map); if (!CollectionUtils.isEmpty(mation)) { @@ -724,15 +715,13 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryShareFileListByUserId(InputObject inputObject, OutputObject outputObject) throws Exception { - Map map = inputObject.getParams(); - Map user = inputObject.getLogParams(); - map.put("userId", user.get("id")); - Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())); - List> beans = fileConsoleDao.queryShareFileListByUserId(map); + public void queryShareFileListByUserId(InputObject inputObject, OutputObject outputObject) { + FileShareQueryDo fileShareQuery = inputObject.getParams(FileShareQueryDo.class); + fileShareQuery.setUserId(inputObject.getLogParams().get("id").toString()); + Page pages = PageHelper.startPage(fileShareQuery.getPage(), fileShareQuery.getLimit()); + List> beans = fileConsoleDao.queryShareFileListByUserId(fileShareQuery); outputObject.setBeans(beans); outputObject.settotal(pages.getTotal()); } @@ -742,11 +731,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void deleteShareFileById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void deleteShareFileById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map user = inputObject.getLogParams(); map.put("userId", user.get("id")); @@ -758,10 +746,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryShareFileMationById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryShareFileMationById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map bean = fileConsoleDao.queryShareFileMationById(map); if (bean != null && !bean.isEmpty()) { @@ -784,10 +771,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryShareFileMationCheckById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryShareFileMationCheckById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map bean = fileConsoleDao.queryShareFileMationCheckById(map); if (bean != null && !bean.isEmpty()) { @@ -804,10 +790,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryShareFileBaseMationById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryShareFileBaseMationById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map baseMation = fileConsoleDao.queryShareFileBaseMationById(map); outputObject.setBean(baseMation); @@ -818,10 +803,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryShareFileListByParentId(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryShareFileListByParentId(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); List> beans; if ("-1".equals(map.get("folderId").toString())) {//加载初始目录 @@ -844,11 +828,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertShareFileListToSave(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertShareFileListToSave(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); List> array = JSONUtil.toList(map.get("jsonStr").toString(), null);//获取数据信息 Map user = inputObject.getLogParams(); @@ -986,10 +969,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryFileToShowById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFileToShowById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map bean = fileConsoleDao.queryFileToShowById(map); String fileType = bean.get("fileType").toString();//文件类型 @@ -1040,9 +1022,11 @@ public class FileConsoleServiceImpl implements FileConsoleService { } /*将文件写入输出流,显示在界面上,实现预览效果*/ - FileInputStream fis = new FileInputStream(filePath); - OutputStream os = PutObject.getResponse().getOutputStream(); + FileInputStream fis = null; + OutputStream os = null; try { + fis = new FileInputStream(filePath); + os = PutObject.getResponse().getOutputStream(); int count = 0; byte[] buffer = new byte[1024 * 1024]; while ((count = fis.read(buffer)) != -1) { @@ -1070,9 +1054,8 @@ public class FileConsoleServiceImpl implements FileConsoleService { * @param fileExtName 文件后缀 * @param userId 用户id * @param folderId 所属文件夹id - * @throws Exception */ - public void createNewFileOrFolder(String fileExtName, String userId, String folderId) throws Exception { + public void createNewFileOrFolder(String fileExtName, String userId, String folderId) { String newFileName = String.valueOf(System.currentTimeMillis()) + "." + fileExtName;//新文件名 String basePath = tPath + Constants.FileUploadPath.getSavePath(FILE_PATH_TYPE) + "/" + userId; FileUtil.createDirs(basePath); @@ -1107,7 +1090,7 @@ public class FileConsoleServiceImpl implements FileConsoleService { * @param path 文件地址 * @throws Exception */ - private void createFile(String fileExtName, String path) throws Exception { + private void createFile(String fileExtName, String path) { if (DiskCloudConstants.FileMation.OFFICE_IS_DOCX.getFileExt().equalsIgnoreCase(fileExtName)) { FileUtil.createNewDocxFile(path); } else if (DiskCloudConstants.FileMation.OFFICE_IS_XLSX.getFileExt().equalsIgnoreCase(fileExtName)) { @@ -1125,11 +1108,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertWordFileToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertWordFileToService(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); createNewFileOrFolder("docx", inputObject.getLogParams().get("id").toString(), map.get("folderId").toString()); } @@ -1139,11 +1121,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertExcelFileToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertExcelFileToService(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); createNewFileOrFolder("xlsx", inputObject.getLogParams().get("id").toString(), map.get("folderId").toString()); } @@ -1153,11 +1134,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertPPTFileToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertPPTFileToService(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); createNewFileOrFolder("ppt", inputObject.getLogParams().get("id").toString(), map.get("folderId").toString()); } @@ -1167,11 +1147,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertTXTFileToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertTXTFileToService(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); createNewFileOrFolder("txt", inputObject.getLogParams().get("id").toString(), map.get("folderId").toString()); } @@ -1181,11 +1160,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertHtmlFileToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertHtmlFileToService(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); createNewFileOrFolder("html", inputObject.getLogParams().get("id").toString(), map.get("folderId").toString()); } @@ -1195,11 +1173,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertDuplicateCopyToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertDuplicateCopyToService(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); List> array = JSONUtil.toList(map.get("jsonStr").toString(), null);//获取数据信息 Map user = inputObject.getLogParams(); @@ -1349,10 +1326,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryFileMationById(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFileMationById(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map bean = fileConsoleDao.queryFileMationById(map); if (!"文件夹".equals(bean.get("fileType").toString())) { @@ -1368,11 +1344,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertFileMationToPackageToFolder(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileMationToPackageToFolder(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); List> array = JSONUtil.toList(map.get("jsonStr").toString(), null);//获取数据信息 if (array.size() > 0) { @@ -1423,9 +1398,12 @@ public class FileConsoleServiceImpl implements FileConsoleService { outputObject.setreturnMessage("该文件已存在,生成失败。"); return; } else { - ZipOutputStream out = new ZipOutputStream(new FileOutputStream(strZipPath)); + ZipOutputStream out = null; try { + out = new ZipOutputStream(new FileOutputStream(strZipPath)); ToolUtil.recursionZip(out, dowlLoadFile, "", tPath.replace("images", ""), 2); + } catch (Exception ee) { + throw new CustomException(ee); } finally { FileUtil.close(out); } @@ -1463,11 +1441,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertFileMationPackageToFolder(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileMationPackageToFolder(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map file = fileConsoleDao.queryFilePackageMationById(map); String fileType = file.get("fileType").toString(); @@ -1479,17 +1456,18 @@ public class FileConsoleServiceImpl implements FileConsoleService { String parentId = file.get("parentId").toString();//压缩包父id String zipfile = tPath.replace("images", "") + file.get("fileAddress").toString();//压缩包文件 if (new File(zipfile).exists()) { - // 设置,默认是UTF-8 - Charset charset = Charset.forName("GBK"); - ZipFile zip = new ZipFile(zipfile, charset); - ZipEntry entry = null; + ZipEntry entry; + ZipFile zip = null; // 封装解压后的路径 BufferedOutputStream bos = null; // 封装待解压文件路径 BufferedInputStream bis = null; List> beans = new ArrayList<>(); - Map bean; try { + // 设置,默认是UTF-8 + Charset charset = Charset.forName("GBK"); + zip = new ZipFile(zipfile, charset); + Map bean; Enumeration enums = (Enumeration) zip.entries(); String fileName = "";//文件名称 String fileZipPath = "";//文件路径--作为文件父id @@ -1539,8 +1517,11 @@ public class FileConsoleServiceImpl implements FileConsoleService { bos.close(); } } + } catch (Exception ee) { + throw new CustomException(ee); } finally { FileUtil.close(bis); + FileUtil.close(bos); FileUtil.close(zip); } String folderId = parentId.substring(0, parentId.lastIndexOf(",")).split(",")[0]; @@ -1571,16 +1552,11 @@ public class FileConsoleServiceImpl implements FileConsoleService { if (DiskCloudConstants.FileMation.judgeIsAllowedFileType(fileExtName, 1)) {//图片 item.put("fileThumbnail", item.get("fileAddress").toString());//文件缩略图地址 } else if (DiskCloudConstants.FileMation.judgeIsAllowedFileType(fileExtName, 6)) {//电子书 - EpubReader epubReader = new EpubReader(); - Book book = epubReader.readEpub(new FileInputStream(tPath.replace("images", "") + item.get("fileAddress").toString())); - Resource resource = book.getResources().getByHref("Images/cover.jpg"); - byte[] p = resource.getData(); String picName = String.valueOf(System.currentTimeMillis()) + ".jpg"; String newFilename = basePath + picName; - FileImageOutputStream imgout = new FileImageOutputStream(new File(newFilename)); - imgout.write(p, 0, p.length); - imgout.close(); - item.put("fileThumbnail", visitPath + "/" + picName);//文件缩略图地址 + writeAndReadQpubFileThumbnail(tPath.replace("images", "") + item.get("fileAddress").toString(), newFilename); + // 文件缩略图地址 + item.put("fileThumbnail", visitPath + "/" + picName); } else if (DiskCloudConstants.FileMation.judgeIsAllowedFileType(fileExtName, 2)) { //office文件缩略图地址 item.put("fileThumbnail", DiskCloudConstants.FileMation.getIconByFileExt(fileExtName)); @@ -1624,11 +1600,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertPasteCopyToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertPasteCopyToService(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); List> array = JSONUtil.toList(map.get("jsonStr").toString(), null);//获取数据信息 Map user = inputObject.getLogParams(); @@ -1776,11 +1751,10 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public void insertPasteCutToService(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertPasteCutToService(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); List> array = JSONUtil.toList(map.get("jsonStr").toString(), null);//获取数据信息 Map user = inputObject.getLogParams(); @@ -1873,10 +1847,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryOfficeUpdateTimeToKey(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryOfficeUpdateTimeToKey(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); Map bean = fileConsoleDao.queryOfficeUpdateTimeToKey(map); outputObject.setBean(bean); @@ -1887,10 +1860,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void queryFileNumStatistics(InputObject inputObject, OutputObject outputObject) throws Exception { + public void queryFileNumStatistics(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); //文件总数量和总存储 Map allNum = fileConsoleDao.queryAllNumFile(map); @@ -1933,10 +1905,9 @@ public class FileConsoleServiceImpl implements FileConsoleService { * * @param inputObject * @param outputObject - * @throws Exception */ @Override - public void insertFileMationToPackageDownload(InputObject inputObject, OutputObject outputObject) throws Exception { + public void insertFileMationToPackageDownload(InputObject inputObject, OutputObject outputObject) { Map map = inputObject.getParams(); List> array = JSONUtil.toList(map.get("jsonStr").toString(), null);//获取数据信息 if (array.size() > 0) { @@ -1988,9 +1959,12 @@ public class FileConsoleServiceImpl implements FileConsoleService { outputObject.setreturnMessage("该文件已存在,生成失败。"); return; } else { - ZipOutputStream out = new ZipOutputStream(new FileOutputStream(strZipPath)); + ZipOutputStream out = null; try { + out = new ZipOutputStream(new FileOutputStream(strZipPath)); ToolUtil.recursionZip(out, dowlLoadFile, "", tPath.replace("images", ""), 2); + } catch (Exception ee) { + throw new CustomException(ee); } finally { FileUtil.close(out); } @@ -2009,4 +1983,26 @@ public class FileConsoleServiceImpl implements FileConsoleService { } } + /** + * 获取并写入epub电子书的缩略图 + * + * @param epubFilePath epub电子书文件地址 + * @param thumbnailPicPath 缩略图图片地址 + */ + private void writeAndReadQpubFileThumbnail(String epubFilePath, String thumbnailPicPath) { + FileImageOutputStream imgout = null; + try { + EpubReader epubReader = new EpubReader(); + Book book = epubReader.readEpub(new FileInputStream(epubFilePath)); + Resource resource = book.getResources().getByHref("Images/cover.jpg"); + byte[] p = resource.getData(); + imgout = new FileImageOutputStream(new File(thumbnailPicPath)); + imgout.write(p, 0, p.length); + } catch (IOException e) { + throw new CustomException(e); + } finally { + FileUtil.close(imgout); + } + } + } diff --git a/skyeye-promote/skyeye-disk-cloud/src/main/resources/mapper/diskcloud/FileConsoleMapper.xml b/skyeye-promote/skyeye-disk-cloud/src/main/resources/mapper/diskcloud/FileConsoleMapper.xml index 32df9512..77490f8c 100644 --- a/skyeye-promote/skyeye-disk-cloud/src/main/resources/mapper/diskcloud/FileConsoleMapper.xml +++ b/skyeye-promote/skyeye-disk-cloud/src/main/resources/mapper/diskcloud/FileConsoleMapper.xml @@ -272,7 +272,7 @@ (#{id}, #{fileId}, #{fileType}, #{fileName}, #{createId}, #{createTime}) - SELECT a.id, a.recycle_name recycleName, @@ -376,7 +376,7 @@ (#{id}, #{fileId}, #{fileType}, #{fileName}, #{shareCode}, #{shareUrl}, #{shareType}, #{sharePassword}, #{state}, #{createId}, #{createTime}) - SELECT a.id, a.share_name shareName, diff --git a/skyeye-promote/skyeye-disk-cloud/src/main/resources/reqmapping/mapping/diskcloud.xml b/skyeye-promote/skyeye-disk-cloud/src/main/resources/reqmapping/mapping/diskcloud.xml index 3865a9bd..752462f8 100644 --- a/skyeye-promote/skyeye-disk-cloud/src/main/resources/reqmapping/mapping/diskcloud.xml +++ b/skyeye-promote/skyeye-disk-cloud/src/main/resources/reqmapping/mapping/diskcloud.xml @@ -50,10 +50,6 @@ - - - - @@ -61,11 +57,6 @@ - - - - - diff --git a/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/diskcloud/filerecycle/FileRecycleQueryDo.java b/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/diskcloud/filerecycle/FileRecycleQueryDo.java new file mode 100644 index 00000000..a98e2892 --- /dev/null +++ b/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/diskcloud/filerecycle/FileRecycleQueryDo.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye + ******************************************************************************/ + +package com.skyeye.eve.entity.diskcloud.filerecycle; + +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.common.entity.CommonPageInfo; +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName: FileRecycleQueryDo + * @Description: 云盘回收站查询条件实体类 + * @author: skyeye云系列--卫志强 + * @date: 2022/7/6 22:41 + * @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved. + * 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的 + */ +@Data +@ApiModel("云盘回收站查询条件实体类") +public class FileRecycleQueryDo extends CommonPageInfo implements Serializable { + + /** + * 当前登陆用户id + */ + private String userId; + +} diff --git a/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/diskcloud/fileshare/FileShareQueryDo.java b/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/diskcloud/fileshare/FileShareQueryDo.java new file mode 100644 index 00000000..66caf774 --- /dev/null +++ b/skyeye-promote/skyeye-entity/src/main/java/com/skyeye/eve/entity/diskcloud/fileshare/FileShareQueryDo.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye + ******************************************************************************/ + +package com.skyeye.eve.entity.diskcloud.fileshare; + +import com.skyeye.annotation.api.ApiModel; +import com.skyeye.annotation.api.ApiModelProperty; +import com.skyeye.common.entity.CommonPageInfo; +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName: FileRecycleQueryDo + * @Description: 云盘文件分享查询条件实体类 + * @author: skyeye云系列--卫志强 + * @date: 2022/7/6 22:41 + * @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved. + * 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的 + */ +@Data +@ApiModel("云盘文件分享查询条件实体类") +public class FileShareQueryDo extends CommonPageInfo implements Serializable { + + @ApiModelProperty(value = "基础路径", required = "required") + private String reqBasePath; + + /** + * 当前登陆用户id + */ + private String userId; + +}