Sfoglia il codice sorgente

上传matterpro数据

dengsixing 2 anni fa
parent
commit
2ca0a6b383

+ 5 - 1
src/main/java/com/fdkankan/scene/service/impl/InnerApiServiceImpl.java

@@ -24,7 +24,9 @@ import com.fdkankan.web.response.ResultData;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 import lombok.extern.slf4j.Slf4j;
 import org.joda.time.DateTime;
@@ -106,13 +108,15 @@ public class InnerApiServiceImpl implements IInnerApiService {
         List<String> fileList = new ArrayList<>();
         FileUtils.readfilePath(dataSource, fileList);
         String ossPath = "";
+        Map<String, String> uploadMap = new HashMap<>();
         for (String filePath : fileList) {
             ossPath = filePath.replace(dataSource, "images/images" + sceneNum + "/");
             if(ossPath.endsWith("/")){
                 ossPath = ossPath.substring(0, ossPath.lastIndexOf("/"));
             }
-            fYunFileService.uploadFile(filePath, ossPath);
+            uploadMap.put(filePath, ossPath);
         }
+        fYunFileService.uploadMulFiles(uploadMap);
 
         ScenePro sceneProEntity = new ScenePro();
         sceneProEntity.setDataSource(dataSource);