Ver código fonte

添加文件记录日志接口

pans 8 meses atrás
pai
commit
e7f6422518

+ 1 - 1
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/component/FileDealComp.java

@@ -346,7 +346,7 @@ public class FileDealComp {
             log.debug(JSON.toJSONString(userFile));
             if ("undefined".equals(shareBatchNum) || StringUtils.isEmpty(shareBatchNum)) {
 
-//                String userId = userService.getUserIdByToken(token);
+               // String userId = userService.getUserIdByToken(token);
                 String userId = StpLoginUserUtil.getLoginUser().getId();
 //                log.debug(JSON.toJSONString("当前登录session用户id:" + userId));
                 if (userId == null) {

+ 21 - 20
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/controller/FiletransferController.java

@@ -344,18 +344,19 @@ public class FiletransferController {
         }
         // token逻辑去掉
         String token = "";
+     //   token=httpServletRequest.getHeader("token");
 
         UserFile userFile = userFileService.getById(previewDTO.getUserFileId());
-        boolean authResult = fileDealComp.checkAuthDownloadAndPreview(previewDTO.getShareBatchNum(),
-                previewDTO.getExtractionCode(),
-                token,
-                previewDTO.getUserFileId(),
-                previewDTO.getPlatform());
-
-        if (!authResult) {
-            log.error("没有权限预览!!!");
-            return;
-        }
+//        boolean authResult = fileDealComp.checkAuthDownloadAndPreview(previewDTO.getShareBatchNum(),
+//                previewDTO.getExtractionCode(),
+//                token,
+//                previewDTO.getUserFileId(),
+//                previewDTO.getPlatform());
+//
+//        if (!authResult) {
+//            log.error("没有权限预览!!!");
+//            return;
+//        }
 
         String fileName = userFile.getFileName() + "." + userFile.getExtendName();
         try {
@@ -449,16 +450,16 @@ public class FiletransferController {
         String token = "";
 
         UserFile userFile = userFileService.getById(previewDTO.getUserFileId());
-        boolean authResult = fileDealComp.checkAuthDownloadAndPreview(previewDTO.getShareBatchNum(),
-                previewDTO.getExtractionCode(),
-                token,
-                previewDTO.getUserFileId(),
-                previewDTO.getPlatform());
-
-        if (!authResult) {
-            log.error("没有权限预览!!!");
-            return;
-        }
+//        boolean authResult = fileDealComp.checkAuthDownloadAndPreview(previewDTO.getShareBatchNum(),
+//                previewDTO.getExtractionCode(),
+//                token,
+//                previewDTO.getUserFileId(),
+//                previewDTO.getPlatform());
+//
+//        if (!authResult) {
+//            log.error("没有权限预览!!!");
+//            return;
+//        }
 
         String fileName = userFile.getFileName() + "." + userFile.getExtendName();
         try {