|
@@ -632,28 +632,9 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
cacheKeys.add(key);
|
|
|
String fileName = key.substring(key.lastIndexOf("/") + 1);
|
|
|
// String url = this.resourceUrl + key.replace(fileName, URLEncoder.encode(fileName, "UTF-8")) + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
- if(key.contains("hot.json") || key.contains("link-scene.json")){
|
|
|
- String content = FileUtil.readUtf8String(key);
|
|
|
- if(StrUtil.isEmpty(content)){
|
|
|
- return;
|
|
|
- }
|
|
|
- content = content.replace(publicUrl, "")
|
|
|
-// .replace(publicUrl+"v3/", "")
|
|
|
- .replace("https://spc.html","spc.html")
|
|
|
- .replace("https://smobile.html", "smobile.html");
|
|
|
- log.info("热点数据:{}", content);
|
|
|
- log.info("热点地址:{}", String.format(sourceLocal, num, prefix + key.replace(FdkkLaserConfig.getProfile(bucket),"")));
|
|
|
- FileUtil.writeUtf8String(content, String.format(sourceLocal, num, prefix + key.replace(FdkkLaserConfig.getProfile(bucket),"")));
|
|
|
- }else{
|
|
|
// HttpUtil.downloadFile(url, String.format(sourceLocal, num, prefix + key));
|
|
|
- try {
|
|
|
-
|
|
|
- ossUtil.downloadFile(bucket, key,String.format(sourceLocal, num, prefix + key.replace(FdkkLaserConfig.getProfile(bucket),"")));
|
|
|
+ ossUtil.downloadFile(bucket, key,String.format(sourceLocal, num, prefix + key.replace(FdkkLaserConfig.getProfile(bucket),"")));
|
|
|
// this.downloadFile(url, String.format(sourceLocal, num, prefix + key));
|
|
|
- }catch (Exception e){
|
|
|
- log.info("下载文件报错,path:{}", key);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
|