|
@@ -86,10 +86,7 @@ public class FiletransferController {
|
|
|
if (!isCheckSuccess) {
|
|
if (!isCheckSuccess) {
|
|
|
return RestResult.fail().message("存储空间不足");
|
|
return RestResult.fail().message("存储空间不足");
|
|
|
}
|
|
}
|
|
|
- UploadFileVo uploadFileVo = filetransferService.uploadFileSpeed(userId,uploadFileDto);
|
|
|
|
|
-
|
|
|
|
|
- operationLogUtil.getOperationLogObj(request,userId,RestResult.success().getMessage(),CURRENT_MODULE,"极速上传",SUCCESS);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ UploadFileVo uploadFileVo = filetransferService.uploadFileSpeed(request,userId,uploadFileDto);
|
|
|
return RestResult.success().data(uploadFileVo);
|
|
return RestResult.success().data(uploadFileVo);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -106,8 +103,7 @@ public class FiletransferController {
|
|
|
if (!isCheckSuccess) {
|
|
if (!isCheckSuccess) {
|
|
|
return RestResult.fail().message("存储空间不足");
|
|
return RestResult.fail().message("存储空间不足");
|
|
|
}
|
|
}
|
|
|
- UploadFileVo uploadFileVo = filetransferService.uploadFileSpeed(userId,uploadFileDto);
|
|
|
|
|
- operationLogUtil.getOperationLogObj(request,userId,RestResult.success().getMessage(),CURRENT_MODULE,"极速上传",SUCCESS);
|
|
|
|
|
|
|
+ UploadFileVo uploadFileVo = filetransferService.uploadFileSpeed(request,userId,uploadFileDto);
|
|
|
return RestResult.success().data(uploadFileVo);
|
|
return RestResult.success().data(uploadFileVo);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -124,7 +120,6 @@ public class FiletransferController {
|
|
|
|
|
|
|
|
UploadFileVo uploadFileVo = new UploadFileVo();
|
|
UploadFileVo uploadFileVo = new UploadFileVo();
|
|
|
|
|
|
|
|
- operationLogUtil.getOperationLogObj(request,userId,RestResult.success().getMessage(),CURRENT_MODULE,"上传文件",SUCCESS);
|
|
|
|
|
|
|
|
|
|
return RestResult.success().data(uploadFileVo);
|
|
return RestResult.success().data(uploadFileVo);
|
|
|
|
|
|
|
@@ -139,7 +134,7 @@ public class FiletransferController {
|
|
|
filetransferService.uploadFile(request, uploadFileDto, userId);
|
|
filetransferService.uploadFile(request, uploadFileDto, userId);
|
|
|
|
|
|
|
|
UploadFileVo uploadFileVo = new UploadFileVo();
|
|
UploadFileVo uploadFileVo = new UploadFileVo();
|
|
|
- operationLogUtil.getOperationLogObj(request,userId,RestResult.success().getMessage(),CURRENT_MODULE,"上传文件",SUCCESS);
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
return RestResult.success().data(uploadFileVo);
|
|
return RestResult.success().data(uploadFileVo);
|
|
|
|
|
|
|
@@ -184,7 +179,6 @@ public class FiletransferController {
|
|
|
httpServletResponse.addHeader("Content-Disposition", "attachment;fileName=" + fileName);// 设置文件名
|
|
httpServletResponse.addHeader("Content-Disposition", "attachment;fileName=" + fileName);// 设置文件名
|
|
|
|
|
|
|
|
filetransferService.downloadFile(httpServletResponse, downloadFileDTO);
|
|
filetransferService.downloadFile(httpServletResponse, downloadFileDTO);
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,StpLoginUserUtil.getLoginUser().getId(),RestResult.success().getMessage(),CURRENT_MODULE,"下载文件",SUCCESS);
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -229,7 +223,6 @@ public class FiletransferController {
|
|
|
httpServletResponse.addHeader("Content-Disposition", "attachment;fileName=" + fileName);// 设置文件名
|
|
httpServletResponse.addHeader("Content-Disposition", "attachment;fileName=" + fileName);// 设置文件名
|
|
|
|
|
|
|
|
filetransferService.downloadFile(httpServletResponse, downloadFileDTO);
|
|
filetransferService.downloadFile(httpServletResponse, downloadFileDTO);
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,commonUserId,RestResult.success().getMessage(),CURRENT_MODULE,"下载文件",SUCCESS);
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -260,7 +253,6 @@ public class FiletransferController {
|
|
|
batchDownloadFileDTO.getUserFileIds(), null);
|
|
batchDownloadFileDTO.getUserFileIds(), null);
|
|
|
if (!authResult) {
|
|
if (!authResult) {
|
|
|
log.error("没有权限下载!!!");
|
|
log.error("没有权限下载!!!");
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,StpLoginUserUtil.getLoginUser().getId(),RestResult.fail().getMessage(),CURRENT_MODULE,"没有权限下载!!!",SUCCESS);
|
|
|
|
|
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -286,8 +278,6 @@ public class FiletransferController {
|
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
|
String fileName = String.valueOf(date.getTime());
|
|
String fileName = String.valueOf(date.getTime());
|
|
|
httpServletResponse.addHeader("Content-Disposition", "attachment;fileName=" + fileName + ".zip");// 设置文件名
|
|
httpServletResponse.addHeader("Content-Disposition", "attachment;fileName=" + fileName + ".zip");// 设置文件名
|
|
|
- filetransferService.downloadUserFileList(httpServletResponse, userFile.getFilePath(), fileName, userFileIds);
|
|
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,StpLoginUserUtil.getLoginUser().getId(),RestResult.success().getMessage(),CURRENT_MODULE,"批量下载文件",SUCCESS);
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -313,7 +303,6 @@ public class FiletransferController {
|
|
|
batchDownloadFileDTO.getUserFileIds(), null);
|
|
batchDownloadFileDTO.getUserFileIds(), null);
|
|
|
if (!authResult) {
|
|
if (!authResult) {
|
|
|
log.error("没有权限下载!!!");
|
|
log.error("没有权限下载!!!");
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,commonUserId,RestResult.fail().getMessage(),CURRENT_MODULE,"没有权限下载!!!",FAIL);
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -338,9 +327,6 @@ public class FiletransferController {
|
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
|
String fileName = String.valueOf(date.getTime());
|
|
String fileName = String.valueOf(date.getTime());
|
|
|
httpServletResponse.addHeader("Content-Disposition", "attachment;fileName=" + fileName + ".zip");// 设置文件名
|
|
httpServletResponse.addHeader("Content-Disposition", "attachment;fileName=" + fileName + ".zip");// 设置文件名
|
|
|
- filetransferService.downloadUserFileList(httpServletResponse, userFile.getFilePath(), fileName, userFileIds);
|
|
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,commonUserId,RestResult.success().getMessage(),CURRENT_MODULE,"批量下载文件",SUCCESS);
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -368,7 +354,6 @@ public class FiletransferController {
|
|
|
|
|
|
|
|
if (!authResult) {
|
|
if (!authResult) {
|
|
|
log.error("没有权限预览!!!");
|
|
log.error("没有权限预览!!!");
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,StpLoginUserUtil.getLoginUser().getId(),RestResult.fail().getMessage(),CURRENT_MODULE,"没有权限预览!!!",FAIL);
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -430,11 +415,11 @@ public class FiletransferController {
|
|
|
downloadFile.getOssClient().shutdown();
|
|
downloadFile.getOssClient().shutdown();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,StpLoginUserUtil.getLoginUser().getId(),RestResult.success().getMessage(),CURRENT_MODULE,"预览文件",SUCCESS);
|
|
|
|
|
|
|
+ operationLogUtil.getOperationLogObj(httpServletRequest,StpLoginUserUtil.getLoginUser().getId(),RestResult.success().getMessage(),CURRENT_MODULE,"预览文件",SUCCESS,previewDTO.getUserFileId(),"preview");
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
filetransferService.previewFile(httpServletResponse, previewDTO);
|
|
filetransferService.previewFile(httpServletResponse, previewDTO);
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,StpLoginUserUtil.getLoginUser().getId(),RestResult.success().getMessage(),CURRENT_MODULE,"预览文件",SUCCESS);
|
|
|
|
|
|
|
+ operationLogUtil.getOperationLogObj(httpServletRequest,StpLoginUserUtil.getLoginUser().getId(),RestResult.success().getMessage(),CURRENT_MODULE,"预览文件",SUCCESS,previewDTO.getUserFileId(),"preview");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -472,7 +457,6 @@ public class FiletransferController {
|
|
|
|
|
|
|
|
if (!authResult) {
|
|
if (!authResult) {
|
|
|
log.error("没有权限预览!!!");
|
|
log.error("没有权限预览!!!");
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,commonUserId,RestResult.fail().getMessage(),CURRENT_MODULE,"没有权限预览",FAIL);
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -534,11 +518,11 @@ public class FiletransferController {
|
|
|
downloadFile.getOssClient().shutdown();
|
|
downloadFile.getOssClient().shutdown();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,commonUserId,RestResult.success().getMessage(),CURRENT_MODULE,"预览文件",SUCCESS);
|
|
|
|
|
|
|
+ operationLogUtil.getOperationLogObj(httpServletRequest,commonUserId,RestResult.success().getMessage(),CURRENT_MODULE,"预览文件",SUCCESS,previewDTO.getUserFileId(),"preview");
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
filetransferService.previewFile(httpServletResponse, previewDTO);
|
|
filetransferService.previewFile(httpServletResponse, previewDTO);
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,commonUserId,RestResult.success().getMessage(),CURRENT_MODULE,"预览文件",SUCCESS);
|
|
|
|
|
|
|
+ operationLogUtil.getOperationLogObj(httpServletRequest,commonUserId,RestResult.success().getMessage(),CURRENT_MODULE,"预览文件",SUCCESS,previewDTO.getUserFileId(),"preview");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -565,7 +549,6 @@ public class FiletransferController {
|
|
|
storage.setStorageSize(storageSize);
|
|
storage.setStorageSize(storageSize);
|
|
|
Long totalStorageSize = storageService.getTotalStorageSize(userId);
|
|
Long totalStorageSize = storageService.getTotalStorageSize(userId);
|
|
|
storage.setTotalStorageSize(totalStorageSize);
|
|
storage.setTotalStorageSize(totalStorageSize);
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,StpLoginUserUtil.getLoginUser().getId(),RestResult.success().getMessage(),CURRENT_MODULE,"预览文件",SUCCESS);
|
|
|
|
|
return RestResult.success().data(storage);
|
|
return RestResult.success().data(storage);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -587,7 +570,6 @@ public class FiletransferController {
|
|
|
storage.setStorageSize(storageSize);
|
|
storage.setStorageSize(storageSize);
|
|
|
Long totalStorageSize = storageService.getTotalStorageSize(userId);
|
|
Long totalStorageSize = storageService.getTotalStorageSize(userId);
|
|
|
storage.setTotalStorageSize(totalStorageSize);
|
|
storage.setTotalStorageSize(totalStorageSize);
|
|
|
- operationLogUtil.getOperationLogObj(httpServletRequest,commonUserId,RestResult.success().getMessage(),CURRENT_MODULE,"预览文件",SUCCESS);
|
|
|
|
|
|
|
|
|
|
return RestResult.success().data(storage);
|
|
return RestResult.success().data(storage);
|
|
|
|
|
|