|
@@ -15,6 +15,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.fdkankan.common.constant.*;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
+import com.fdkankan.common.util.CmdUtils;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
import com.fdkankan.download.bean.*;
|
|
|
import com.fdkankan.download.entity.ScenePlus;
|
|
@@ -259,7 +260,9 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
//更新进度为90%
|
|
|
this.updateProgress(new BigDecimal("0.9").divide(new BigDecimal("0.8"), 6, BigDecimal.ROUND_HALF_UP), num,
|
|
|
SceneDownloadProgressStatus.DOWNLOAD_COMPRESSING.code(), null, "v4");
|
|
|
- ZipUtil.zip(String.format(this.sourceLocal, num, ""), zipPath);
|
|
|
+
|
|
|
+// ZipUtil.zip(String.format(this.sourceLocal, num, ""), zipPath);
|
|
|
+ this.zip(String.format(this.sourceLocal, num, ""), zipPath);
|
|
|
|
|
|
//上传压缩包
|
|
|
String uploadPath = String.format(this.zipOssFormat, num);
|
|
@@ -279,6 +282,12 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void zip(String sourcePath, String zipPath) throws Exception {
|
|
|
+ FileUtil.mkParentDirs(zipPath);
|
|
|
+ String cmd = "cd " + sourcePath + " && zip -r -p " + zipPath + " *";
|
|
|
+ CmdUtils.callLineSh(cmd, 200);
|
|
|
+ }
|
|
|
+
|
|
|
private SceneViewInfo getSceneJson(String num){
|
|
|
String sceneJsonData = redisUtil.get(String.format(RedisKey.SCENE_JSON, num));
|
|
|
if(StrUtil.isEmpty(sceneJsonData)){
|