Browse Source

Merge branch 'master' into obt

tianboguang 2 năm trước cách đây
mục cha
commit
f4a7251595

+ 5 - 5
src/main/java/com/fdkankan/contro/mq/service/impl/BuildSceneServiceImpl.java

@@ -190,13 +190,15 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
             }
             JSONObject fdageData = getFdageData(path + File.separator + "capture" +File.separator+"data.fdage");
 
+            ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);
+
             Integer cameraType = Integer.parseInt(message.getBuildContext().get("cameraType").toString());
-            Map<String, String> uploadFiles = getUploadFiles(path,cameraType,fdageData);
+            Map<String, String> uploadFiles = getUploadFiles(scenePlus,path,cameraType,fdageData);
 
             //计算场景消耗磁盘空间
             long space = this.calUseSpace(uploadFiles);
 
-            ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);
+
             scenePlus.setPayStatus(PayStatus.PAY.code());
             //如果相机容量不足,需要把场景的paystatus改为容量不足状态
             if (cameraType != 14) {
@@ -295,15 +297,13 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
         }
     }
 
-    private Map<String, String> getUploadFiles(String path,Integer cameraType,JSONObject fdageData) throws Exception {
-        ScenePlus scenePlus = scenePlusService.getByFileId(path);
+    private Map<String, String> getUploadFiles(ScenePlus scenePlus,String path,Integer cameraType,JSONObject fdageData) throws Exception {
         if (ObjectUtils.isEmpty(scenePlus)) {
             throw new Exception("未找到场景信息:" + path);
         }
 
         String projectNum = scenePlus.getNum();
 
-
         String dataViewPath = String.format(UploadFilePath.DATA_VIEW_PATH, projectNum);
         String imagesPath = String.format(UploadFilePath.IMG_VIEW_PATH, projectNum);
         String videoPath = String.format(UploadFilePath.VIDEOS_VIEW_PATH, projectNum);

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

@@ -588,7 +588,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
         byte[] res = RSAEncrypt.decrypt(RSAEncrypt.loadPrivateKeyByStr(RSAEncrypt.loadPrivateKeyByFile()),
                 base64.decode(cipher));
         String restr = new String(res, "UTF-8");
-        log.info("uploadSuccessBuild-params解密结果:" + restr);
+        log.info("turntableUploadSuccess-params解密结果:" + restr);
         String[] strArr = restr.split(SPLICE);
         if (strArr.length != 3) {
             throw new BusinessException(ErrorCode.PARAM_REQUIRED);