瀏覽代碼

下载于hash

lyhzzz 3 月之前
父節點
當前提交
a311d1f49e
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/main/java/com/fdkankan/fusion/service/impl/CommonUploadServiceImpl.java

+ 5 - 5
src/main/java/com/fdkankan/fusion/service/impl/CommonUploadServiceImpl.java

@@ -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";
     }