dengsixing 3 dias atrás
pai
commit
1621d80471

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

@@ -76,7 +76,7 @@ public class SceneFileController{
      */
      */
     @PostMapping("uploadSuccessBuild")
     @PostMapping("uploadSuccessBuild")
     public ResultData uploadSuccessBuild(String params) throws Exception {
     public ResultData uploadSuccessBuild(String params) throws Exception {
-        return sceneFileBuildService.uploadSuccessBuild(params, null, false);
+        return sceneFileBuildService.uploadSuccessBuild(params, null, false, true);
     }
     }
 
 
     /**
     /**
@@ -87,7 +87,7 @@ public class SceneFileController{
      */
      */
     @PostMapping("turntableUploadSuccess")
     @PostMapping("turntableUploadSuccess")
     public ResultData turntableUploadSuccess(String params) throws Exception {
     public ResultData turntableUploadSuccess(String params) throws Exception {
-        return sceneFileBuildService.turntableUploadSuccess(params, null, false);
+        return sceneFileBuildService.turntableUploadSuccess(params, null, false, true);
     }
     }
 
 
     @GetMapping("rebuildScene")
     @GetMapping("rebuildScene")

+ 2 - 2
src/main/java/com/fdkankan/contro/mq/listener/UploadSceneListener.java

@@ -131,9 +131,9 @@ public class UploadSceneListener {
         String params = snCode + "#" + fileId + "#" + uniCode;
         String params = snCode + "#" + fileId + "#" + uniCode;
         String encode = Base64.encode(RSAEncrypt.encrypt(RSAEncrypt.loadPublicKeyByStr(RSAEncrypt.loadPublicKeyByFile()), params.getBytes(StandardCharsets.UTF_8)));
         String encode = Base64.encode(RSAEncrypt.encrypt(RSAEncrypt.loadPublicKeyByStr(RSAEncrypt.loadPublicKeyByFile()), params.getBytes(StandardCharsets.UTF_8)));
         if(camType == 9 || camType == 10 || camType == 11){
         if(camType == 9 || camType == 10 || camType == 11){
-            sceneFileBuildService.turntableUploadSuccess(encode, user, true);
+            sceneFileBuildService.turntableUploadSuccess(encode, user, true, false);
         }else{
         }else{
-            sceneFileBuildService.uploadSuccessBuild(encode, user, true);
+            sceneFileBuildService.uploadSuccessBuild(encode, user, true, false);
         }
         }
     }
     }
 
 

+ 2 - 2
src/main/java/com/fdkankan/contro/service/ISceneFileBuildService.java

@@ -24,9 +24,9 @@ public interface ISceneFileBuildService extends IService<SceneFileBuild> {
 
 
     ResponseSceneFile preUpload(String params) throws Exception;
     ResponseSceneFile preUpload(String params) throws Exception;
 
 
-    ResultData uploadSuccessBuild(String params, User user, boolean forceBuild) throws Exception;
+    ResultData uploadSuccessBuild(String params, User user, boolean forceBuild, boolean checkUploadFile) throws Exception;
 
 
-    ResultData turntableUploadSuccess(String params, User user, boolean forceBuild) throws Exception;
+    ResultData turntableUploadSuccess(String params, User user, boolean forceBuild, boolean checkUploadFile) throws Exception;
 
 
     ResultData rebuildScene(String num,Boolean force,Boolean deleteExtras, String from) throws IOException;
     ResultData rebuildScene(String num,Boolean force,Boolean deleteExtras, String from) throws IOException;
 
 

+ 8 - 4
src/main/java/com/fdkankan/contro/service/impl/SceneFileBuildServiceImpl.java

@@ -698,7 +698,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     }
     }
 
 
     @Override
     @Override
-    public ResultData uploadSuccessBuild(String params, User user, boolean forceBuild) throws Exception {
+    public ResultData uploadSuccessBuild(String params, User user, boolean forceBuild, boolean checkUploadFile) throws Exception {
         log.info("uploadSuccessBuild-params: " + params);
         log.info("uploadSuccessBuild-params: " + params);
         String preParams = params;
         String preParams = params;
         if (StringUtils.isEmpty(params)) {
         if (StringUtils.isEmpty(params)) {
@@ -741,7 +741,9 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             Set<String> notExistsFiles = commonService.checkUploadFile(mac, fileId, folderName, fYunFileConfig.getFyunType());
             Set<String> notExistsFiles = commonService.checkUploadFile(mac, fileId, folderName, fYunFileConfig.getFyunType());
             if(CollUtil.isNotEmpty(notExistsFiles)){
             if(CollUtil.isNotEmpty(notExistsFiles)){
                 log.error("文件缺失, unicode:{}, 缺失文件:{}", folderName, notExistsFiles);
                 log.error("文件缺失, unicode:{}, 缺失文件:{}", folderName, notExistsFiles);
-                throw new BusinessException(ModelingControlRespCode.FILE_EMPTY.code(), ModelingControlRespCode.FILE_EMPTY.message());
+                if(checkUploadFile){
+                    throw new BusinessException(ModelingControlRespCode.FILE_EMPTY.code(), ModelingControlRespCode.FILE_EMPTY.message());
+                }
             }
             }
         }
         }
 
 
@@ -847,7 +849,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     }
     }
 
 
     @Override
     @Override
-    public ResultData turntableUploadSuccess(String params, User user, boolean forceBuild) throws Exception {
+    public ResultData turntableUploadSuccess(String params, User user, boolean forceBuild, boolean checkUploadFille) throws Exception {
         log.info("turntableUploadSuccess-params: " + params);
         log.info("turntableUploadSuccess-params: " + params);
         String preParams = params;
         String preParams = params;
         if (StringUtils.isEmpty(params)) {
         if (StringUtils.isEmpty(params)) {
@@ -890,7 +892,9 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
             Set<String> notExistsFiles = commonService.checkUploadFile(mac, fileId, folderName, fYunFileConfig.getFyunType());
             Set<String> notExistsFiles = commonService.checkUploadFile(mac, fileId, folderName, fYunFileConfig.getFyunType());
             if(CollUtil.isNotEmpty(notExistsFiles)){
             if(CollUtil.isNotEmpty(notExistsFiles)){
                 log.error("文件缺失, unicode:{}, 缺失文件:{}", folderName, notExistsFiles);
                 log.error("文件缺失, unicode:{}, 缺失文件:{}", folderName, notExistsFiles);
-                throw new BusinessException(ModelingControlRespCode.FILE_EMPTY.code(), ModelingControlRespCode.FILE_EMPTY.message());
+                if(checkUploadFille){
+                    throw new BusinessException(ModelingControlRespCode.FILE_EMPTY.code(), ModelingControlRespCode.FILE_EMPTY.message());
+                }
             }
             }
         }
         }