lyhzzz 11 ماه پیش
والد
کامیت
8ec1f43f8a

+ 3 - 0
src/main/java/com/fdkankan/ucenter/common/constants/ResultCode.java

@@ -36,4 +36,7 @@ public class ResultCode {
     public static final int FAILURE_CODE_400013  = 400013 ;
     public static final String FAILURE_MSG_400013  = "原始数据已冻结" ;
 
+    public static final int FAILURE_CODE_400014  = 400014 ;
+    public static final String FAILURE_MSG_400014  = "原始数据不存在" ;
+
 }

+ 8 - 0
src/main/java/com/fdkankan/ucenter/service/impl/DownService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.constant.SceneConstant;
 import com.fdkankan.common.exception.BusinessException;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.util.RedisUtil;
 import com.fdkankan.ucenter.common.DownloadStatusEnum;
@@ -52,6 +53,8 @@ public class DownService implements IDownService {
     LaserService laserService;
     @Autowired
     ICameraTypeService cameraTypeService;
+    @Autowired
+    FYunFileServiceInterface fYunFileServiceInterface;
 
     @Override
     public DownVo checkDownLoad(String sceneNum,Integer isObj) {
@@ -428,6 +431,11 @@ public class DownService implements IDownService {
         if(sceneColdStorage != null && sceneColdStorage.getState() == 1){
             throw new BusinessException(ResultCode.FAILURE_CODE_400013,ResultCode.FAILURE_MSG_400013);
         }
+        ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
+        String dataSource = scenePlusExt.getDataSource();
+        if(!fYunFileServiceInterface.fileExist(dataSource.replace("/mnt/data","home")+"/data.fdage")){
+            throw new BusinessException(ResultCode.FAILURE_CODE_400013,ResultCode.FAILURE_MSG_400013);
+        }
 
     }