|
@@ -2275,21 +2275,10 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
createCompleteExcel(path,examApplyExports);
|
|
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 filename = FileUtils.encodingZipFilename("学员信息数据");
|
|
|
String zipFile = FileUtils.getZipAbsoluteFile(filename);
|
|
String zipFile = FileUtils.getZipAbsoluteFile(filename);
|
|
|
FileUtils.toZip(zipFile, destDirPath, true);
|
|
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 {
|
|
try {
|
|
|
-// String upload = ossService.upload(ossRequest);
|
|
|
|
|
//删除本地资源
|
|
//删除本地资源
|
|
|
Path pathStr = Paths.get(destDirPath);
|
|
Path pathStr = Paths.get(destDirPath);
|
|
|
try (Stream<Path> walk = Files.walk(pathStr)) {
|
|
try (Stream<Path> walk = Files.walk(pathStr)) {
|
|
@@ -2299,22 +2288,10 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
log.error("删除本地资源失败:" + DateUtils.getNowTime());
|
|
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));
|
|
map.put("zip", AjaxResult.success(filename));
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-// collect.forEach((k,v ) ->{
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// });
|
|
|
|
|
// List<UserSubscribeStudentExportVo> list1 = new ArrayList<>();
|
|
// List<UserSubscribeStudentExportVo> list1 = new ArrayList<>();
|
|
|
// List<FileBean> fileBeanList = new ArrayList<>(); //图片列表
|
|
// List<FileBean> fileBeanList = new ArrayList<>(); //图片列表
|
|
|
// String filename = FileUtils.encodingZipFilename("学员信息数据");
|
|
// String filename = FileUtils.encodingZipFilename("学员信息数据");
|