소스 검색

修改文件解压及上传逻辑

tianboguang 2 년 전
부모
커밋
6c52da2723
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/main/java/com/fdkankan/contro/controller/SceneFileController.java

+ 3 - 3
src/main/java/com/fdkankan/contro/controller/SceneFileController.java

@@ -138,7 +138,7 @@ public class SceneFileController{
 
 
     @PostMapping("sendCallAlgorithm")
-    public ResultData sendCallAlgorithm(Map<String,String> params) throws Exception {
+    public ResultData sendCallAlgorithm(@RequestBody Map<String,String> params) throws Exception {
         log.info("sendCallAlgorithm 参数为:{}",JSONObject.toJSONString(params));
         String filePath = params.get("filePath");
         if(ObjectUtils.isEmpty(filePath)){
@@ -170,10 +170,10 @@ public class SceneFileController{
         log.info("dataSource 为:{}", dataSource);
 
         // 解压资源文件上传
-        ZipUtil.unzip(filePath.concat(zipFileName),dataSource.concat(File.separator).concat("capture"));
+        ZipUtil.unzip(filePath.concat(zipFileName),filePath);
 
         // 上传oaas
-        fYunFileService.uploadFileByCommand(dataSource.concat(File.separator).concat("capture"), ConstantFilePath.OSS_PREFIX.concat(subFolder));
+        fYunFileService.uploadFileByCommand(filePath.concat(folderName), ConstantFilePath.OSS_PREFIX.concat(subFolder));
 
         // 通知计算
         return sceneFileBuildService.copyDataAndBuild(null,dataSource ,"V4");