Pārlūkot izejas kodu

fix: 解决没有自动解压的问题

WANGKANG 1 mēnesi atpakaļ
vecāks
revīzija
c69fa23683

+ 3 - 3
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TargetDetectionServiceImpl.java

@@ -242,15 +242,15 @@ public class TargetDetectionServiceImpl extends BaseServiceImpl<TargetDetectionM
         // 步骤 5. 将算法参数map序列化为json字符串,保存到数据库中
         entity.setAlgorithmParameters(JsonUtils.toJsonString(result));
 
-        makeDir(entity.getInputPath());
-        makeDir(entity.getOutputPath());
-
         File file = new File(entity.getInputPath());
         if (!file.exists()) {
             String resourcePath = getResourcePath(ossService.getById(entity.getInputOssId()));
             ZipUtils.unzip(resourcePath, entity.getInputPath());
         }
 
+        makeDir(entity.getInputPath());
+        makeDir(entity.getOutputPath());
+
         return entity;
     }
 

+ 3 - 3
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/ToInfraredServiceImpl.java

@@ -342,15 +342,15 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
         // 步骤 5. 将算法参数map序列化为json字符串,保存到数据库中
         entity.setAlgorithmParameters(JsonUtils.toJsonString(result));
 
-        makeDir(entity.getInputPath());
-        makeDir(entity.getOutputPath());
-
         File file = new File(entity.getInputPath());
         if (!file.exists()) {
             String resourcePath = getResourcePath(ossService.getById(entity.getInputOssId()));
             ZipUtils.unzip(resourcePath, entity.getInputPath());
         }
 
+        makeDir(entity.getInputPath());
+        makeDir(entity.getOutputPath());
+
         return entity;
     }
 

+ 3 - 3
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TrackSequenceServiceImpl.java

@@ -344,15 +344,15 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
         // 步骤 5. 将算法参数map序列化为json字符串,保存到数据库中
         entity.setAlgorithmParameters(JsonUtils.toJsonString(result));
 
-        makeDir(entity.getInputPath());
-        makeDir(entity.getOutputPath());
-
         File file = new File(entity.getInputPath());
         if (!file.exists()) {
             String resourcePath = getResourcePath(ossService.getById(entity.getInputOssId()));
             ZipUtils.unzip(resourcePath, entity.getInputPath());
         }
 
+        makeDir(entity.getInputPath());
+        makeDir(entity.getOutputPath());
+
         return entity;
     }