lyhzzz 1 månad sedan
förälder
incheckning
8b01885d1e

+ 3 - 3
src/main/java/com/fdkankan/fusion/down/FusionDownService.java

@@ -378,9 +378,9 @@ public class FusionDownService {
        String swssPath = path + "/swss/"+num;
        String swssZipPath = swssPath +".zip";
 
-       Integer isObj = 0;
-       if(type == 4 || type == 6){
-           isObj =1;
+       Integer isObj = 1;
+       if(NumTypeUtils.isLaser(type) ){
+           isObj =0;
        }
        try {
 

+ 4 - 3
src/main/java/com/fdkankan/fusion/service/impl/DownService.java

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.enums.DownloadStatusEnum;
+import com.fdkankan.fusion.common.util.NumTypeUtils;
 import com.fdkankan.fusion.common.util.RedisKeyUtil;
 import com.fdkankan.fusion.entity.*;
 import com.fdkankan.fusion.exception.BusinessException;
@@ -75,7 +76,7 @@ public class DownService implements IDownService {
         }
         Integer sceneType =  plus.getSceneSource();
         log.info("checkDownLoad--sceneType:{},isObj:{}",sceneType,isObj);
-        if((sceneType == 4 || sceneType == 5) && isObj !=1){ //深时场景
+        if(NumTypeUtils.isLaserBySceneSource(sceneType) && isObj !=1){ //深时场景
             return SSCheckDownload(sceneNum);
         }
         SceneDownLog sceneDownloadLog;
@@ -120,7 +121,7 @@ public class DownService implements IDownService {
         Integer sceneVersion = getSceneVersion( scenePlus);
         log.info("down--sceneType:{},isObj:{}",sceneType,isObj);
         saveLog(scenePlus,sceneVersion,type,isObj);
-        if((sceneType == 4 || sceneType == 5) && isObj !=1){ //深时场景
+        if(NumTypeUtils.isLaserBySceneSource(sceneType)  && isObj !=1){ //深时场景
             return SSDownload(sceneNum,userId);
         }
         String redisKeyProcess = RedisKey.PREFIX_DOWNLOAD_PROGRESS_V4;
@@ -175,7 +176,7 @@ public class DownService implements IDownService {
         }
         Integer sceneType =  scenePlus.getSceneSource();
         log.info("downloadProcess--sceneType:{},isObj:{}",sceneType,isObj);
-        if((sceneType == 4 || sceneType == 5) && isObj !=1){ //深时场景
+        if(NumTypeUtils.isLaserBySceneSource(sceneType)  && isObj !=1){ //深时场景
             return SSDownloadProcess(sceneNum);
         }
         String redisKey = RedisKey.PREFIX_DOWNLOAD_PROGRESS_V4;

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

@@ -370,7 +370,7 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
     private HashMap<String,String> getGlbUrl(Integer type, String num) {
         String objPath = String.format(FilePath.OBJ_LOCAL_PATH ,environment,num);
         try {
-            if(type == 0 || type == 1 || type == 4 || type == 6 || type == 7){ //看看,看见
+            if(!NumTypeUtils.isLaser(type) ){ //看看,看见
                 ShellUtil.yunDownload(String.format(FilePath.OBJ_OSS_PATH, num)+"/data/mesh" ,objPath);
                 List<String> localGlbPaths = new ArrayList<>();
                 List<String> ossGlbPaths = new ArrayList<>();