yangdamao 1 месяц назад
Родитель
Сommit
d7d55f7865

+ 0 - 23
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserSubscribeServiceImpl.java

@@ -2275,21 +2275,10 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
             createCompleteExcel(path,examApplyExports);
         }
 
-        //打包zip 上传oss
-//        String zipPath = zhiyuan + "/zhongzheng-admin/src/main/resources/"
-//                + String.format("%s预约考试%s.zip", DateUtils.timestampToDateFormat(bo.getApplySiteExamTime(), "yyyy-MM-dd"), DateUtils.getNowTime());
         String filename = FileUtils.encodingZipFilename("学员信息数据");
         String zipFile = FileUtils.getZipAbsoluteFile(filename);
         FileUtils.toZip(zipFile, destDirPath, true);
-        //上传oss
-//        OssRequest ossRequest = new OssRequest();
-//        ossRequest.setGradeId(0L);
-//        ossRequest.setUserId(0L);
-//        ossRequest.setImageStatus(7);
-//        File file1 = new File(zipPath);
-//        ossRequest.setFile(FileUtils.getMultipartFile(file1));
         try {
-//            String upload = ossService.upload(ossRequest);
             //删除本地资源
             Path pathStr = Paths.get(destDirPath);
             try (Stream<Path> walk = Files.walk(pathStr)) {
@@ -2299,22 +2288,10 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                 log.error("删除本地资源失败:" + DateUtils.getNowTime());
             }
 
-//            Path zipStr = Paths.get(zipPath);
-//            try (Stream<Path> walk = Files.walk(zipStr)) {
-//                walk.sorted(Comparator.reverseOrder())
-//                        .forEach(FileUtils::deleteDirectoryStream);
-//            } catch (IOException e) {
-//                log.error("删除本地资源失败:" + DateUtils.getNowTime());
-//            }
             map.put("zip", AjaxResult.success(filename));
         } catch (Exception e) {
             e.printStackTrace();
         }
-
-//        collect.forEach((k,v ) ->{
-//
-//
-//        });
 //        List<UserSubscribeStudentExportVo> list1 = new ArrayList<>();
 //        List<FileBean> fileBeanList = new ArrayList<>(); //图片列表
 //        String filename = FileUtils.encodingZipFilename("学员信息数据");