|
@@ -186,14 +186,15 @@ public class DataService {
|
|
|
// httpURLConnection.connect();
|
|
|
|
|
|
//读取文件流并保存在本地
|
|
|
- String zipFilePath="xinchuangdata/input/imageZip/"+originalCaseId+"/"+cpSerialNum+"/"+originalCaseId+".zip";
|
|
|
+ String prefix="/Users/xujiawei/crowd/crowdsource-backend/";
|
|
|
+ String zipFilePath=prefix+"xinchuangdata/input/imageZip/"+originalCaseId+"/"+cpSerialNum+"/"+originalCaseId+".zip";
|
|
|
File zipFile=new File(zipFilePath);
|
|
|
if(!zipFile.getParentFile().exists()) { zipFile.getParentFile().mkdirs(); }
|
|
|
if(!sourceZipFile.isEmpty()) { sourceZipFile.transferTo(zipFile); }
|
|
|
- String jsonFilePath="xinchuangdata/input/"+originalCaseId+"/"+cpSerialNum+"/"+originalCaseId+".json";
|
|
|
+ String jsonFilePath=prefix+"xinchuangdata/input/"+originalCaseId+"/"+cpSerialNum+"/"+originalCaseId+".json";
|
|
|
File jsonFile=new File(jsonFilePath);
|
|
|
if(!jsonFile.getParentFile().exists()) { jsonFile.getParentFile().mkdirs(); }
|
|
|
- if(!sourceJsonFile.isEmpty()) { sourceJsonFile.transferTo(zipFile); }
|
|
|
+ if(!sourceJsonFile.isEmpty()) { sourceJsonFile.transferTo(jsonFile); }
|
|
|
//读取本地文件
|
|
|
BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(jsonFile));
|
|
|
ByteArrayOutputStream buf = new ByteArrayOutputStream();
|
|
@@ -221,7 +222,7 @@ public class DataService {
|
|
|
bugDetailDao.save(bugDetail);
|
|
|
}
|
|
|
//解压图片文件,上传至oss
|
|
|
- String destPath="xinchuangdata/input/imageUnzip/"+originalCaseId+"/"+cpSerialNum;
|
|
|
+ String destPath=prefix+"xinchuangdata/input/imageUnzip/"+originalCaseId+"/"+cpSerialNum;
|
|
|
File unzipFile=new File(destPath);
|
|
|
if(!unzipFile.getParentFile().exists()) { unzipFile.getParentFile().mkdirs(); }
|
|
|
unZip(zipFile,destPath,originalCaseId,cpSerialNum);
|