ソースを参照

fix: 修正可见光转红外的一些bug

WANGKANG 7 ヶ月 前
コミット
2620fd71e0

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

@@ -182,6 +182,12 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
         entity.setRemarks(toInfraredBo.getRemarks());
         entity.setAlgorithmModelId(toInfraredBo.getAlgorithmModelId());
 
+        boolean flag = this.save(entity);
+
+        if(!flag) {
+            return false;
+        }
+
         AlgorithmModelTrack algorithmModelTrack = algorithmModelTrackService.getById(entity.getAlgorithmModelId());
         AlgorithmConfigTrack algorithmConfigTrack = algorithmConfigTrackService.getById(algorithmModelTrack.getAlgorithmId());
 
@@ -208,7 +214,7 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
             ZipUtils.unzip(resourcePath, entity.getInputPath());
         }
 
-        return this.save(entity);// 使用全局配置的雪花算法主键生成器生成ID值
+        return this.updateById(entity);// 使用全局配置的雪花算法主键生成器生成ID值
     }
 
     /**
@@ -268,7 +274,7 @@ public class ToInfraredServiceImpl extends BaseServiceImpl<ToInfraredMapper, ToI
     }
 
     public String getPredictInputPath(SysOssVo ossEntity) {
-        return getUnZipDirPath(ossEntity) + File.separator + BizConstant.TO_INFRARED_PREDICT_INPUT_DIR;
+        return getUnZipDirPath(ossEntity);
     }
 
     public String getPredictOutputPath(ToInfrared entity, SysOssVo ossEntity) {