lyhzzz 2 years ago
parent
commit
76a78792b0

+ 1 - 1
src/main/java/com/fdkankan/fusion/controller/CaseFusionController.java

@@ -62,7 +62,7 @@ public class CaseFusionController extends BaseController{
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
         FusionNum fusionNum = fusionNumService.getById(param.getFusionNumId());
-        fusionMeterService.deleteByFusionId(fusionNum.getFusionId());
+        fusionMeterService.deleteByModelId(fusionNum.getModelId());
         fusionNumService.removeById(param.getFusionNumId());
         return ResultData.ok();
     }

+ 2 - 1
src/main/java/com/fdkankan/fusion/service/impl/ModelServiceImpl.java

@@ -159,10 +159,10 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
                     model.setModelGlbUrl(queryPath + glbOssPath);
                     model.setCreateStatus(1);  //上传成功
                     modelService.saveOrUpdate(model);
-                    redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"100");
                 }catch (Exception e){
                     model.setCreateStatus(-1);
                     modelService.saveOrUpdate(model);
+                    redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"-1");
                 }finally {
                     if(newObjFile!=null){
                         FileUtil.del(newObjFile);
@@ -173,6 +173,7 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
                     if(mntFile!=null){
                         FileUtil.del(mntFile.getParentFile());
                     }
+                    redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"100");
                 }
             }
         }.start();