|
@@ -14,6 +14,7 @@ import com.fdkankan.common.constant.CommonStatus;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.constant.SceneKind;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
+import com.fdkankan.common.util.CmdUtils;
|
|
|
import com.fdkankan.common.util.DateExtUtil;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
import com.fdkankan.download.constant.CommonConstant;
|
|
@@ -172,7 +173,8 @@ public class DownloadServiceImpl implements IDownloadService {
|
|
|
this.zipBat(num, "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);
|
|
|
|
|
|
FileUtil.del(String.format(this.sourceLocal, num, ""));
|
|
|
|
|
@@ -495,5 +497,13 @@ public class DownloadServiceImpl implements IDownloadService {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
+ private void zip(String sourcePath, String zipPath) throws Exception {
|
|
|
+ String cmd = "cd " + sourcePath + " && zip -r " + zipPath + " " + "*";
|
|
|
+ CmdUtils.callLineSh(cmd, 200);
|
|
|
+ if(!FileUtil.exist(zipPath)){
|
|
|
+ throw new RuntimeException("打包失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|