|
@@ -330,19 +330,18 @@ public class SceneOfflinePackagePushServiceImpl extends ServiceImpl<SceneOffline
|
|
long size = FileUtil.size(new File(zipPath));
|
|
long size = FileUtil.size(new File(zipPath));
|
|
Integer mbSize = FileSizeUtil.convert(size, FileSizeUnitType.MB.code());
|
|
Integer mbSize = FileSizeUtil.convert(size, FileSizeUnitType.MB.code());
|
|
String dirPath = null;
|
|
String dirPath = null;
|
|
- if(mbSize > 100){
|
|
|
|
- String unzipPath = offlineZipDir.concat(num).concat("-").concat(zipType).concat("-").concat(String.valueOf(version));
|
|
|
|
- ZipUtil.unzip(zipPath, unzipPath, Charset.forName("GBK"));
|
|
|
|
- if("laser".equals(zipType)){
|
|
|
|
- dirPath = unzipPath.concat("/www");
|
|
|
|
- }else{
|
|
|
|
- dirPath = unzipPath.concat("/wwwroot/scene_view_data");
|
|
|
|
- }
|
|
|
|
- String cmd = "cd " + dirPath + " && zip -r zip/" + num + ".zip " + num + " -s 100M";
|
|
|
|
- log.info("压缩命令:{}", cmd);
|
|
|
|
- RuntimeUtil.exec(cmd);
|
|
|
|
|
|
|
|
|
|
+ String unzipPath = offlineZipDir.concat(num).concat("-").concat(zipType).concat("-").concat(String.valueOf(version));
|
|
|
|
+ ZipUtil.unzip(zipPath, unzipPath, Charset.forName("GBK"));
|
|
|
|
+ if("laser".equals(zipType)){
|
|
|
|
+ dirPath = unzipPath.concat("/www");
|
|
|
|
+ }else{
|
|
|
|
+ dirPath = unzipPath.concat("/wwwroot/scene_view_data");
|
|
}
|
|
}
|
|
|
|
+ String volumeName = dirPath.concat("/zip/").concat(num).concat(".zip");
|
|
|
|
+ String cmd = "cd " + dirPath + " && zip -r " + volumeName + " " + num + " -s 20M";
|
|
|
|
+ log.info("压缩命令:{}", cmd);
|
|
|
|
+ RuntimeUtil.exec(cmd);
|
|
|
|
|
|
// ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
// ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
// ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
// ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
|