소스 검색

修改fileId获取逻辑

tianboguang 2 년 전
부모
커밋
9828ebbf2f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/main/java/com/fdkankan/contro/controller/SceneFileController.java

+ 2 - 2
src/main/java/com/fdkankan/contro/controller/SceneFileController.java

@@ -24,7 +24,6 @@ import com.fdkankan.web.response.ResultData;
 import lombok.extern.log4j.Log4j2;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.tomcat.util.bcel.Const;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -221,7 +220,8 @@ public class SceneFileController{
         }
 
         if (org.springframework.util.ObjectUtils.isEmpty(fileId)) {
-            throw new BusinessException(ErrorCode.PARAM_ERROR,"获取FileID 失败,请重新拍摄!");
+            fileId = new SnowflakeIdGenerator(0, 0).nextId() + "";
+            log.info("新生成build数据,{}", fileId);
         }
 
         sceneFileBuild = new SceneFileBuild();