|
@@ -331,9 +331,9 @@ public class CaseDownService {
|
|
|
downResource(img.getCaseId(),img.getImgUrl());
|
|
|
}
|
|
|
jsonObject.put(basePath+caseImg+caseId, ResultData.ok(caseImgList));
|
|
|
-
|
|
|
-
|
|
|
- FileUtil.writeString(JSON.toJSONString(jsonObject), FilePath.OFFLINE_PACKAGE_PATH+caseId+"/www/package/"+jsonDataName,"UTF-8");
|
|
|
+ String jsonString = JSON.toJSONString(jsonObject);
|
|
|
+ jsonString = jsonString.replaceAll(queryPath,"/oss/");
|
|
|
+ FileUtil.writeString(jsonString, FilePath.OFFLINE_PACKAGE_PATH+caseId+"/www/package/"+jsonDataName,"UTF-8");
|
|
|
|
|
|
}
|
|
|
|
|
@@ -436,6 +436,11 @@ public class CaseDownService {
|
|
|
if(res.contains(".json") || res.contains(".shp") || res.contains(".obj")){
|
|
|
res = new File(res).getParentFile().getPath();
|
|
|
}
|
|
|
+ File file = new File(path + "/oss/" + res);
|
|
|
+ if(file.isDirectory()){
|
|
|
+ ShellUtil.yunDownload(res, file.getParentFile().getPath());
|
|
|
+ return;
|
|
|
+ }
|
|
|
ShellUtil.yunDownload(res, path +"/oss/" + res);
|
|
|
}
|
|
|
}
|