|
@@ -115,7 +115,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
|
|
|
private ResultData uploadModelZip(String oldName,File file,Integer dictId) {
|
|
|
|
|
|
String ossZipPath = String.format(OssPath.MANAGE_MODEL_FILE_PATH, UUID.randomUUID().toString().replace("-", ""));
|
|
|
- String unzipPath = CacheUtil.basePath + ossZipPath;
|
|
|
+ String unzipPath = CacheUtil.basePath +File.separator + ossZipPath;
|
|
|
ShellUtil.unZip(file.getPath(),unzipPath);
|
|
|
try {
|
|
|
Thread.sleep(1000L);
|
|
@@ -212,7 +212,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
|
|
|
throw new BusinessException(ResultCode.UPLOAD_FILE_ERROR);
|
|
|
}
|
|
|
FileUtil.del(unzipPath);
|
|
|
- return ossUrlPrefix + ossPath;
|
|
|
+ return ossPath;
|
|
|
}
|
|
|
|
|
|
@Autowired
|
|
@@ -230,7 +230,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
|
|
|
throw new BusinessException(ResultCode.UPLOAD_FILE_ERROR);
|
|
|
}
|
|
|
FileUtil.del(unzipPath);
|
|
|
- return ossUrlPrefix + ossPath;
|
|
|
+ return ossPath;
|
|
|
}
|
|
|
|
|
|
private String uploadOss(String unzipPath,File modelFile) {
|
|
@@ -241,7 +241,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
|
|
|
throw new BusinessException(ResultCode.UPLOAD_FILE_ERROR);
|
|
|
}
|
|
|
FileUtil.del(unzipPath);
|
|
|
- return ossUrlPrefix + modelOssPath;
|
|
|
+ return modelOssPath;
|
|
|
}
|
|
|
|
|
|
private String uploadLasOrPly(String unzipPath ,File modelFile) {
|
|
@@ -252,7 +252,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
|
|
|
throw new BusinessException(-1,"缺少cloud.js文件");
|
|
|
}
|
|
|
FileUtil.del(unzipPath);
|
|
|
- return ossUrlPrefix + ossPath + "/webcloud";
|
|
|
+ return ossPath + "/webcloud";
|
|
|
}
|
|
|
|
|
|
|