|
@@ -1147,7 +1147,7 @@ public class PageServiceImpl implements PageService {
|
|
|
String ossName = archiveFile.getOssName();
|
|
|
// 设置URL过期时间为1个小时
|
|
|
Date expiration = new Date(System.currentTimeMillis() + 3600L * 1000);
|
|
|
- /*SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
try {
|
|
|
Date dateOne = format.parse("2021-06-01 00:00:00");
|
|
|
Date dateTwo = format.parse("2021-09-17 18:00:00");
|
|
@@ -1158,7 +1158,7 @@ public class PageServiceImpl implements PageService {
|
|
|
}
|
|
|
} catch (ParseException e) {
|
|
|
log.info("格式化时间错误", e);
|
|
|
- }*/
|
|
|
+ }
|
|
|
String url = ossClient.generatePresignedUrl(bucketName, active + "/archiveFile/" + ossName, expiration).toString();
|
|
|
ossClient.shutdown();
|
|
|
return url;
|