瀏覽代碼

bug修复

dengsixing 3 年之前
父節點
當前提交
82dd9c00f8
共有 14 個文件被更改,包括 137 次插入131 次删除
  1. 12 0
      4dkankan-center-modeling/src/main/java/com/fdkankan/modeling/constants/SysConstants.java
  2. 0 3
      4dkankan-center-modeling/src/main/java/com/fdkankan/modeling/job/EcsJob.java
  3. 19 19
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneController.java
  4. 1 1
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneCooperationController.java
  5. 9 9
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/TestController.java
  6. 2 2
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/FolderServiceImpl.java
  7. 1 1
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/PicSceneProgressServiceImpl.java
  8. 4 3
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java
  9. 5 5
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneFileBuildServiceImpl.java
  10. 31 31
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneProAppServiceImpl.java
  11. 45 49
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneProServiceImpl.java
  12. 6 6
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneServiceImpl.java
  13. 1 1
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneUploadServiceImpl.java
  14. 1 1
      4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/VideoSceneProgressServiceImpl.java

+ 12 - 0
4dkankan-center-modeling/src/main/java/com/fdkankan/modeling/constants/SysConstants.java

@@ -2,6 +2,7 @@ package com.fdkankan.modeling.constants;
 
 import com.fdkankan.common.util.FileUtils;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -9,6 +10,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
+import org.springframework.util.ObjectUtils;
 
 @Component
 public class SysConstants {
@@ -50,4 +52,14 @@ public class SysConstants {
     public void setModelTimeOut(int timeOut){
         SysConstants.modelTimeOut = timeOut;
     }
+
+    /**
+     * 常驻服务实例ID集合
+     */
+    @Value("${residenceService.hostNames:#{null}}")
+    public void setResidenceServiceHostName(String[] hostNames){
+        if(!ObjectUtils.isEmpty(hostNames)){
+            SysConstants.residenceServiceHostName = Arrays.asList(hostNames);
+        }
+    }
 }

+ 0 - 3
4dkankan-center-modeling/src/main/java/com/fdkankan/modeling/job/EcsJob.java

@@ -30,11 +30,8 @@ public class EcsJob {
         }
         Executors.newSingleThreadScheduledExecutor().scheduleWithFixedDelay(() -> {
 
-            //判断消息树
-
                     // 判断是否有任务执行
                     if (SysConstants.SYSTEM_BUILDING) {
-                        log.error("{} 服务构建中,退出停止服务请求!", SysConstants.hostName);
                         return;
                     }
                     log.info("服务未构建,准备停止服务!");

+ 19 - 19
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneController.java

@@ -231,7 +231,7 @@ public class SceneController {
 //    public ResultData findSceneEcs(HttpServletRequest request) throws Exception{
 //        String sceneNum = request.getParameter("num");
 //        if(StringUtils.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //        SceneProEntity sceneProEntity = sceneProService.findBySceneNum(sceneNum);
 //        if(sceneProEntity == null){
@@ -261,7 +261,7 @@ public class SceneController {
 //        String num = request.getParameter("num");
 //        String token = request.getHeader("token");
 //        if(StringUtil.isEmpty(num) ){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        SSOUser ssoUser = SSOLoginHelper.loginCheck(token);
@@ -457,7 +457,7 @@ public class SceneController {
 //
 //        if(StringUtils.isEmpty(phoneNum) || StringUtils.isEmpty(password)
 //                || StringUtils.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        if(scene.getUserId()==null)
@@ -517,7 +517,7 @@ public class SceneController {
 //        String lang = request.getParameter("lang");
 //
 //        if(StringUtils.isEmpty(phoneNum) || StringUtils.isEmpty(password)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        Result result = userService.findByUserName(phoneNum);
@@ -552,7 +552,7 @@ public class SceneController {
 //        String lang = request.getParameter("lang");
 //
 //        if(StringUtils.isEmpty(phoneNum) || StringUtils.isEmpty(password)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        Result result = userService.findByUserName(phoneNum);
@@ -581,7 +581,7 @@ public class SceneController {
 //    public ResultData getVoiceSound(HttpServletRequest request) throws Exception {
 //        String sceneNum = request.getParameter("num");
 //        if(StringUtils.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //        SceneProEntity sceneProEntity = sceneProService.findBySceneNum(sceneNum);
 //        if(sceneProEntity == null){
@@ -603,7 +603,7 @@ public class SceneController {
 //        String sceneNum = request.getParameter("num");
 //
 //        if(StringUtils.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //        SceneProEntity sceneProEntity = sceneProService.findBySceneNum(sceneNum);
 //        if(sceneProEntity == null){
@@ -923,7 +923,7 @@ public class SceneController {
 //        String num = request.getParameter("num");
 //
 //        if(StringUtils.isEmpty(num)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        List<String> result = new ArrayList<>();
@@ -947,7 +947,7 @@ public class SceneController {
 //    @ApiImplicitParam(name = "num", value = "场景吗", dataType = "String")
 //    public ResultData createScene(@RequestBody SceneParamVO param) throws Exception{
 //        if(StringUtils.isEmpty(param.getNum())){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        StringBuffer dataBuf = new StringBuffer()
@@ -1242,7 +1242,7 @@ public class SceneController {
 //        String images = request.getParameter("images");
 //
 //        if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(moduleName) || StringUtils.isEmpty(videoUrl)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        SceneModuleVideoEntity entity = new SceneModuleVideoEntity();
@@ -1273,7 +1273,7 @@ public class SceneController {
 //        String id = request.getParameter("id");
 //
 //        if(org.springframework.util.StringUtils.isEmpty(id)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        sceneModuleVideoService.deleteById(Long.valueOf(id));
@@ -1301,7 +1301,7 @@ public class SceneController {
 //        String sceneNum = request.getParameter("sceneNum");
 //
 //        if(StringUtils.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        //获取getInfo的数据
@@ -1504,7 +1504,7 @@ public class SceneController {
 //        String sceneNum = request.getParameter("sceneNum");
 //
 //        if(StringUtils.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        StringBuffer dataBuf = new StringBuffer()
@@ -1549,7 +1549,7 @@ public class SceneController {
 //        String sceneNum = request.getParameter("sceneNum");
 //
 //        if(StringUtils.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        //生成二维码
@@ -1599,7 +1599,7 @@ public class SceneController {
 //    public ResultData addDownloadNum(HttpServletRequest request) throws Exception{
 //        String sceneNum = request.getParameter("sceneNum");
 //        if(StringUtil.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        SceneProEntity sceneProEntity = sceneProService.findBySceneNum(sceneNum);
@@ -1757,7 +1757,7 @@ public class SceneController {
 //        }
 //
 //        if(StringUtil.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        SceneProEntity sceneProEntity = sceneProService.findBySceneNum(sceneNum);
@@ -1808,11 +1808,11 @@ public class SceneController {
 //        }
 //
 //        if(StringUtil.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        if(StringUtil.isEmpty(vrsceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //        SceneProEntity sceneProEntity = sceneProService.findBySceneNum(sceneNum);
@@ -1856,7 +1856,7 @@ public class SceneController {
 //        }
 //
 //        if(StringUtil.isEmpty(sceneNum)){
-//            throw new BaseRuntimeException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
+//            throw new BaseRuntimeException(LoginConstant.PARAM_REQUIRED, LoginConstant.FAILURE_MSG_3001);
 //        }
 //
 //

+ 1 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneCooperationController.java

@@ -53,7 +53,7 @@ public class SceneCooperationController extends BaseController {
         SSOUser ssoUser = ssoLoginHelper.loginCheck(getToken());
 
         if(StrUtil.isEmpty(param.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         // 解密获得username,用于和数据库进行对比

+ 9 - 9
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/TestController.java

@@ -128,15 +128,15 @@ public class TestController extends BaseController {
 //        TLogMqWrapBean<BuildSceneMqMessage> tLogMqWrap = new TLogMqWrapBean(buildSceneMqMessage);
 //        rocketMQProducer.syncSend("test_topic_dsx", tLogMqWrap);
 
-        ResultData<Camera> cameraById = platformGoodsClient.getCameraById(123L);
-        Enumeration<String> headerNames = request.getHeaderNames();
-        while (headerNames.hasMoreElements()){
-            String s = headerNames.nextElement();
-            log.info(s + "=" + request.getHeader(s));
-        }
-
-        TLogIdGenerator bean = SpringUtil.getBean(TLogIdGenerator.class);
-        log.info(bean.generateTraceId());
+//        ResultData<Camera> cameraById = platformGoodsClient.getCameraById(123L);
+//        Enumeration<String> headerNames = request.getHeaderNames();
+//        while (headerNames.hasMoreElements()){
+//            String s = headerNames.nextElement();
+//            log.info(s + "=" + request.getHeader(s));
+//        }
+//
+//        TLogIdGenerator bean = SpringUtil.getBean(TLogIdGenerator.class);
+//        log.info(bean.generateTraceId());
 
         return ResultData.ok();
 

+ 2 - 2
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/FolderServiceImpl.java

@@ -108,11 +108,11 @@ public class FolderServiceImpl extends ServiceImpl<IFolderMapper, Folder> implem
     public void move(FolderVO folderVO) {
 
         if(StrUtil.isEmpty(folderVO.getFolderIds()) && StrUtil.isEmpty(folderVO.getSceneIds())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         if(Objects.isNull(folderVO.getFolderType())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         String[] folderIds = folderVO.getFolderIds().split(",");

+ 1 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/PicSceneProgressServiceImpl.java

@@ -91,7 +91,7 @@ public class PicSceneProgressServiceImpl extends ServiceImpl<IPicSceneProgressMa
     public ResultData rebuildPicSceneProgress(RebuildVedioSceneParamVO param) throws Exception {
 
         if(StringUtils.isEmpty(param.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro sceneProEntity = sceneProService.findBySceneNum(param.getNum());

+ 4 - 3
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -761,6 +761,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
         if(file.getOriginalFilename().endsWith(".zip")){
             //解压zip包
             FileUtil.unZip(zipTargetFilePath, targetImagesPath);
+//            FileUtils.decompress(zipTargetFilePath, targetImagesPath);
             //删除压缩包
             FileUtil.delFile(zipTargetFilePath);
         }
@@ -890,7 +891,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
             array = uploadJson.getJSONArray("upload");
         }
         if(array == null){
-            throw new Exception("upload.json数据出错");
+            throw new BusinessException(ErrorCode.FAILURE_CODE_7013);
         }
         JSONObject fileJson = null;
         String fileName = "";
@@ -1185,7 +1186,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
         String lockKey = String.format(RedisLockKey.LOCK_SCENE_SYNC, num);
         Boolean lock = redisLockUtil.lock(lockKey, RedisKey.EXPIRE_TIME_2_HOUR);
         if(!lock){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_5036);
+            throw new BusinessException(ErrorCode.SYSTEM_BUSY);
         }
         try {
 
@@ -1306,7 +1307,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
             //因为共享目录有延迟,这里循环检测算法是否计算完毕3次,每次隔五秒
             boolean exist = ComputerUtil.checkComputeCompleted(uploadJsonPath, maxCheckTimes, waitTime);
             if(!exist){
-                throw new BusinessException(ErrorCode.FAILURE_CODE_5042);
+                throw new BusinessException(ErrorCode.FAILURE_CODE_7017);
             }
 
             String zipPath = target + File.separator + "results/" + num + ".zip";

+ 5 - 5
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneFileBuildServiceImpl.java

@@ -735,7 +735,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
         if(StringUtils.isEmpty(prefix) || StringUtils.isEmpty(dataFdage) || StringUtils.isEmpty(zipName) ||
                 StringUtils.isEmpty(userName) || StringUtils.isEmpty(password)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ResultData<Camera> cameraResult = platformGoodsClient.getCameraByChildName(userName);
@@ -1194,7 +1194,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
                 StrUtil.isEmpty(buildScene.getSceneName()) || StrUtil.isEmpty(buildScene.getSceneDec()) ||
                 buildScene.getSceneType() == null || buildScene.getShootCount() == null ||
                 StrUtil.isEmpty(buildScene.getThumb()) || StrUtil.isEmpty(buildScene.getAlgorithm()) ){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
         String sceneNum = null;
         try{
@@ -2506,7 +2506,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
 
     public ResultData rebuildScene(String num) throws Exception {
         if (StringUtils.isEmpty(num)) {
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         // TODO: 2022/3/16 旧主表逻辑, 待删除 -------------------------------start
@@ -2720,7 +2720,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     public ResultData rebuildVideoScene(RebuildVedioSceneParamVO param) throws Exception {
 
         if(StringUtils.isEmpty(param.getNum()) || StringUtils.isEmpty(param.getPanoId())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         String num = param.getNum();
@@ -2852,7 +2852,7 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
     public ResultData rebuildPicScene(@RequestBody RebuildVedioSceneParamVO param) throws Exception {
 
         if(StringUtils.isEmpty(param.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         String num = param.getNum();

+ 31 - 31
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneProAppServiceImpl.java

@@ -100,7 +100,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData saveInitialPage(SceneEditParamVO base) throws Exception {
         if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getInitialPoint())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -166,7 +166,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     public ResultData saveFloorLogo(SceneEditParamVO base) throws Exception {
         if(StrUtil.isEmpty(base.getNum()) || StrUtil.isEmpty(base.getSize()) ||
                 StrUtil.isEmpty(base.getLogoType())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -211,7 +211,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @SuppressWarnings("unchecked")
     public ResultData saveHot(SceneEditParamVO base) throws Exception {
         if(StrUtil.isEmpty(base.getType())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -267,7 +267,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData saveBackgroundMusic(SceneEditParamVO base) throws Exception {
         if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getMusicName())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -301,7 +301,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     public ResultData saveSceneInfo(SceneEditParamVO base) throws Exception{
         if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getSceneName()) ||
                 StringUtils.isEmpty(base.getSceneType()) || StringUtils.isEmpty(base.getSceneDec())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -359,7 +359,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData saveSceneKey(SceneEditParamVO base) throws Exception{
         if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getSceneKey())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -395,7 +395,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData saveTourList(SceneEditParamVO base) throws Exception{
         if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getTourList())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -466,7 +466,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData uploadPic(String sceneNum, String folderName, MultipartFile file) throws Exception{
         if(StringUtils.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -518,7 +518,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData uploadScreencapVoice(String sceneNum, MultipartFile file) throws Exception{
         if(StringUtils.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -591,7 +591,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     public ResultData saveScreencapFile(SceneEditParamVO base) throws Exception{
         if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getIndex()) ||
                 StringUtils.isEmpty(base.getCamerasData())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -648,7 +648,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData saveHotVisible(SceneEditParamVO base) throws Exception{
         if(StringUtils.isEmpty(base.getData())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -703,7 +703,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData saveLinkPano(SceneEditParamVO base) throws Exception{
         if(StringUtils.isEmpty(base.getData()) || StringUtils.isEmpty(base.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -787,7 +787,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData getRecordAudioFromWeixin(SceneEditParamVO base) throws Exception{
         if(StringUtils.isEmpty(base.getNum()) || StringUtils.isEmpty(base.getId())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -871,7 +871,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
         String id = param.getId();
         String fileName = param.getFileName();
         if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(id)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -958,7 +958,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
         String soundFile = param.getSoundFile();
         String fileName = param.getFileName();
         if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(soundFile)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -1033,7 +1033,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
         String index = param.getIndex();
         String times = param.getTimes();
         if(StringUtils.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -1159,7 +1159,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
             long start = System.currentTimeMillis();
             log.info("画墙重建模型开始时间:{}", start);
             if(StringUtils.isEmpty(sceneEdit.getNum())){
-                throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+                throw new BusinessException(ErrorCode.PARAM_REQUIRED);
             }
 
             ScenePro scenePro = baseMapper.findByNum(sceneEdit.getNum());
@@ -1228,7 +1228,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData saveScreencapData(SceneEditParamVO base) throws Exception {
         if(StringUtils.isEmpty(base.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -1312,7 +1312,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
 
     public ResultData saveAllVisi(SceneEditParamVO base) throws Exception {
         if(StrUtil.isEmpty(base.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(base.getNum());
@@ -1350,7 +1350,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData uploadFloorplanPng(String sceneNum, MultipartFile file, String cadInfo) throws Exception {
         if(StringUtils.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
         if (file.isEmpty() && file.getSize() <= 0) {
             throw new BusinessException(ErrorCode.FAILURE_CODE_5012);
@@ -1434,7 +1434,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData uploadBgMusic(String sceneNum, String fileName, MultipartFile file) throws Exception {
         if(StringUtils.isEmpty(sceneNum) || StringUtils.isEmpty(fileName)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -1495,7 +1495,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData deleteUploadBgMusic(String sceneNum) throws Exception {
         if(StringUtils.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -1955,7 +1955,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public Page<SceneVO> getAllSceneByPage(@RequestBody UserParamVO param) {
         if(StrUtil.isEmpty(param.getAppUserName()) && StrUtil.isEmpty(param.getPhoneNum()) ){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         Long cameraId = null;
@@ -2068,7 +2068,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public List<SceneVO> getAllForCameraName(@RequestBody UserParamVO user){
         if(StrUtil.isEmpty(user.getAppUserName()) || StrUtil.isEmpty(user.getAppPassword())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
         ResultData<Camera> cameraResult = platformGoodsClient.getByChildNameAndChildPassword(user.getAppUserName(), user.getAppPassword());
         Camera camera = cameraResult.getData();
@@ -2094,7 +2094,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     public Long getSceneCount(@RequestBody UserParamVO user) {
 
         if(StrUtil.isEmpty(user.getAppUserName()) || StrUtil.isEmpty(user.getAppPassword())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
         ResultData<Camera> CameraResult = platformGoodsClient.getByChildNameAndChildPassword(user.getAppUserName(), user.getAppPassword());
         Camera camera = CameraResult.getData();
@@ -2110,7 +2110,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
 
         if(StrUtil.isEmpty(user.getAppUserName()) || StrUtil.isEmpty(user.getAppPassword())
                 || StrUtil.isEmpty(user.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
         ResultData<Camera> CameraResult = platformGoodsClient.getByChildNameAndChildPassword(user.getAppUserName(), user.getAppPassword());
         Camera camera = CameraResult.getData();
@@ -2136,7 +2136,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
                 || StrUtil.isEmpty(user.getUnicode())){
             log.info("appUserName:" + user.getAppUserName() + ",appPassword:" + user.getAppPassword() +
                     ",unicode:" + user.getUnicode());
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
         ResultData<Camera> CameraResult = platformGoodsClient.getByChildNameAndChildPassword(user.getAppUserName(), user.getAppPassword());
         Camera camera = CameraResult.getData();
@@ -2177,7 +2177,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData deleteForCameraName(@RequestBody UserParamVO user) throws Exception {
         if (user.getCameraId() == null || StrUtil.isEmpty(user.getNum())) {
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
         ResultData<CameraDetail> detailResult = platformGoodsClient.getCameraDetailByCameraId(user.getCameraId());
         CameraDetail detail = detailResult.getData();
@@ -2403,7 +2403,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     public ResultData getScreencapVoice(@RequestBody SceneParamVO scene) throws Exception {
         if (StrUtil.isEmpty(scene.getScreencapMusic()) || StrUtil.isEmpty(scene.getOriginalFileName())
                 || StrUtil.isEmpty(scene.getNum())) {
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = sceneProService.findBySceneNum(scene.getNum());
@@ -2440,7 +2440,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
 
     public List<SceneVO> getAllSceneByUserName(UserParamVO user) throws Exception {
         if (StrUtil.isEmpty(user.getPhoneNum())) {
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ResultData<User> userResult = platformUserClient.getUserByName(user.getPhoneNum());
@@ -2469,7 +2469,7 @@ public class SceneProAppServiceImpl extends ServiceImpl<ISceneProMapper, ScenePr
     @Override
     public ResultData cooperationSceneList(@RequestBody UserParamVO user){
         if (StrUtil.isEmpty(user.getPhoneNum())) {
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ResultData<User> userResult = platformUserClient.getUserByName(user.getPhoneNum());

+ 45 - 49
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneProServiceImpl.java

@@ -229,7 +229,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     @Override
     public ResultData resetUploadFloorJson(SceneEditParamVO sceneEdit) throws Exception{
         if(StrUtil.isEmpty(sceneEdit.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(sceneEdit.getNum());
@@ -295,7 +295,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             long start = System.currentTimeMillis();
             log.info("画墙重建模型开始时间:" + start);
             if(StrUtil.isEmpty(sceneEdit.getNum())){
-                throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+                throw new BusinessException(ErrorCode.PARAM_REQUIRED);
             }
 
             ScenePro scenePro = findBySceneNum(sceneEdit.getNum());
@@ -534,7 +534,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         try {
 
             if(StrUtil.isEmpty(sceneNum)){
-                throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+                throw new BusinessException(ErrorCode.PARAM_REQUIRED);
             }
 
             ScenePro scenePro = findBySceneNum(sceneNum);
@@ -704,7 +704,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData addHotMediaInfo(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum()) || StrUtil.isEmpty(base.getType()) ||
                 StrUtil.isEmpty(base.getInfo())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -736,7 +736,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData saveScreencapFile(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum()) || StrUtil.isEmpty(base.getIndex()) ||
                 StrUtil.isEmpty(base.getCamerasData())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -787,7 +787,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     @Override
     public ResultData saveSceneKey(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum()) || StrUtil.isEmpty(base.getSceneKey())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -809,7 +809,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData saveFloorLogo(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum()) || StrUtil.isEmpty(base.getSize()) ||
                 StrUtil.isEmpty(base.getLogoType())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -835,7 +835,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     @Override
     public ResultData saveBackgroundMusic(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum()) || StrUtil.isEmpty(base.getMusicName())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -896,7 +896,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     @Override
     public ResultData getScreencapVoice(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -1124,7 +1124,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sceneNum = param.getNum();
         String fileName = param.getFileName();
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(sceneNum);
@@ -1265,7 +1265,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sceneNum = param.getNum();
         String index = param.getIndex();
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(sceneNum);
@@ -1357,7 +1357,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     @Override
     public ResultData deleteScreencapVoice(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -1419,7 +1419,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     @Override
     public ResultData deleteScreencap(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -1470,7 +1470,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData saveTourList(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum()) || StrUtil.isEmpty(base.getTourList()) ||
                 StrUtil.isEmpty(base.getScreencapLen())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -1501,7 +1501,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData saveSceneInfo(SceneEditParamVO base) throws Exception{
 
         if(StrUtil.isEmpty(base.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = this.findBySceneNum(base.getNum());
@@ -2159,7 +2159,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sceneNum = param.getNum();
         String sid = param.getSid();
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = this.findBySceneNum(sceneNum);
@@ -2522,7 +2522,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             return;
         }
         try{
-                FileUtils.writeFile(hotJsonPath, jsonObject.toJSONString());
+            FileUtils.writeFile(hotJsonPath, jsonObject.toJSONString());
         }finally {
             redisLockUtil.unlockLua(lockKey);
         }
@@ -2616,7 +2616,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
 //    @SystemServiceLog(description = "保存场景热点")
     public ResultData saveShopHot(SceneEditParamVO base) throws Exception {
         if(StrUtil.isEmpty(base.getType())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         String fileName = "shopHot.json";
@@ -2727,7 +2727,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     @Override
     public ResultData saveOverlay(SceneEditParamVO base) throws Exception {
         if(StrUtil.isEmpty(base.getType())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         String sid = base.getSid();
@@ -2839,7 +2839,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sceneNum = param.getNum();
         String sid = param.getSid();
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(sceneNum);
@@ -2875,7 +2875,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
 //    @SystemServiceLog(description = "保存场景热点")
     public ResultData saveScreencapData(SceneEditParamVO base) throws Exception {
         if(StrUtil.isEmpty(base.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -3060,7 +3060,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     @Override
     public ResultData uploadShareLogo(SceneEditParamVO base, MultipartFile file) throws Exception {
         if(file == null || StrUtil.isEmpty(base.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = findBySceneNum(base.getNum());
@@ -3127,7 +3127,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String folderName = param.getFolderName();
         String toOss = param.getToOss();
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -3171,7 +3171,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData uploadHotJsonToOss(SceneEditParamVO param) throws Exception {
         String sceneNum = param.getNum();
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         String path = ConstantFilePath.SCENE_PATH+"data"+File.separator+"data"+sceneNum;
@@ -3191,7 +3191,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sceneNum = param.getNum();
         String cadInfo = param.getCadInfo();
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -3393,7 +3393,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sceneNum = param.getNum();
         String status = param.getStatus();
         if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(status)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -3457,10 +3457,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
 //        SceneProExt sceneProExt = sceneProExtService.findBySceneProId(scenePro.getId());
         ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
 
-        if (file == null || file.getSize() <= 0) {
-            throw new BusinessException(ErrorCode.FAILURE_CODE_5012);
-        }
-
         //文件上传的位置可以自定义
         String path = scenePlusExt.getDataSource() + "_obj2txt";
         String zipPath = path + "/zip/";
@@ -3680,7 +3676,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String fileName = param.getFileName();
         String jsonData = param.getJsonData();
         if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName) || StrUtil.isEmpty(jsonData)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -3707,7 +3703,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String planId = param.getPlanId();
         String type = param.getPlanId();
         if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName) || StrUtil.isEmpty(type)|| StrUtil.isEmpty(planId)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         if(fileName.contains("..") || fileName.contains("./\\") || fileName.contains(".//")
@@ -3763,7 +3759,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String fileName = param.getFileName();
         String planId = param.getPlanId();
         if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName) || StrUtil.isEmpty(type) || StrUtil.isEmpty(planId)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -3835,7 +3831,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String vfov = param.getVfov();
         if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName) ||
                 StrUtil.isEmpty(planId) || StrUtil.isEmpty(rect)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -4004,7 +4000,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String fileName = param.getFileName();
         String planId = param.getPlanId();
         if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName) || StrUtil.isEmpty(planId)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -4070,7 +4066,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sceneNum = param.getNum();
         String fileName = param.getFileName();
         if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -4117,7 +4113,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData deleteUploadBgMusic(FileParamVO param) throws Exception {
         String sceneNum = param.getNum();
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -4152,7 +4148,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sid = param.getSid();
         String imagesName = param.getImagesName();
         if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(sid)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -4316,7 +4312,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String fileData = param.getFileData();
         String sid = param.getSid();
         if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(fileName)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = baseMapper.findByNum(sceneNum);
@@ -4368,7 +4364,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sceneNum = param.getNum();
         String floorJsonData = param.getFloorJsonData();
         if(StrUtil.isEmpty(sceneNum) ){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         StringBuffer dataBuf = new StringBuffer()
@@ -4408,7 +4404,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sceneNum = param.getNum();
         String floorJsonData = param.getFloorJsonData();
         if(StrUtil.isEmpty(sceneNum) || StrUtil.isEmpty(floorJsonData)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         StringBuffer dataBuf = new StringBuffer()
@@ -4490,7 +4486,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData downloadPanoramaData(SceneEditParamVO param) throws Exception {
         String sceneNum = param.getNum();
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
         ScenePro scenePro = findBySceneNum(sceneNum);
         if(scenePro == null){
@@ -4548,7 +4544,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData downloadVisionData(SceneEditParamVO param) throws Exception {
         String sceneCode = param.getSceneName();
         if(StrUtil.isEmpty(sceneCode)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
         List<ScenePro> sceneProList =  this.list(
                 new QueryWrapper<ScenePro>()
@@ -4591,7 +4587,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     @Override
     public SceneVO getInfo(String sceneNum) {
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
 
@@ -4723,7 +4719,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData getRecordAudioFromBrowser(FileParamVO param, MultipartFile file) throws IOException {
         String sceneNum = param.getNum();
         if(StrUtil.isEmpty(sceneNum) || file.isEmpty() || file.getSize() <= 0){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = this.findBySceneNum(sceneNum);
@@ -4751,7 +4747,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData checkVideoUrl(FileParamVO param) {
         String path = param.getPath();
         if(StrUtil.isEmpty(path)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         if(!path.contains("qq.com") && !path.contains("youku.com") && !path.contains("iqiyi.com")){
@@ -4818,7 +4814,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     public ResultData downloadTexData(String num) throws Exception {
 
         if(StrUtil.isEmpty(num)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 //        ScenePro scenePro = this.findBySceneNum(num);
         ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
@@ -5185,7 +5181,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         Integer status = param.getStatus();
 
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = sceneProService.findBySceneNum(sceneNum);
@@ -5211,7 +5207,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String sceneNum = param.getNum();
 
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = sceneProService.findBySceneNum(sceneNum);

+ 6 - 6
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneServiceImpl.java

@@ -104,7 +104,7 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
 //    @SystemServiceLog(description = "上传场景的热点媒体文件")
     public void uploadHotMedia(String sceneNum, MultipartFile file) throws IOException {
         if(StrUtil.isEmpty(sceneNum)){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePO scene = findBySceneNum(sceneNum);
@@ -505,7 +505,7 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
 //    @SystemServiceLog(description = "保存场景热点")
     public ResultData saveHot(SceneEditParamVO base) throws Exception {
         if(StrUtil.isEmpty(base.getHotData()) || StrUtil.isEmpty(base.getType())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         String sid = base.getSid();
@@ -617,7 +617,7 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
 //    @SystemServiceLog(description = "漫游可行")
     public ResultData saveLinkPano(SceneEditParamVO base) throws Exception {
         if(StrUtil.isEmpty(base.getData()) || StrUtil.isEmpty(base.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePO scene = baseMapper.findByNum(base.getNum());
@@ -684,7 +684,7 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
 //    @SystemServiceLog(description = "保存热点可见性的数据")
     public ResultData saveHotVisible(SceneEditParamVO base) throws Exception {
         if(StrUtil.isEmpty(base.getData())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
 //        ScenePO scene = findBySceneNum(base.getNum());
@@ -903,7 +903,7 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
     public ResultData addHotMediaInfo(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum()) || StrUtil.isEmpty(base.getType()) ||
                 StrUtil.isEmpty(base.getInfo())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePO scene = findBySceneNum(base.getNum());
@@ -948,7 +948,7 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
     public ResultData saveScreencapFile(SceneEditParamVO base) throws Exception{
         if(StrUtil.isEmpty(base.getNum()) || StrUtil.isEmpty(base.getIndex()) ||
                 StrUtil.isEmpty(base.getCamerasData())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePO scene = findBySceneNum(base.getNum());

+ 1 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/SceneUploadServiceImpl.java

@@ -122,7 +122,7 @@ public class SceneUploadServiceImpl extends ServiceImpl<ISceneUploadMapper, Scen
                 uploadToOssUtil.upload2(newFile.getPath(),ossPath);
             }catch (Exception e){
                 log.error(ossPath+"上传文件失败"+e);
-                throw new BusinessException(-1,"上传文件失败");
+                throw new BusinessException(ErrorCode.FAILURE_CODE_7013);
             }
             //String url =String.format("http://%s.%s/%s", bucket, point.replace("http://",""), ossPath);
             urlList.add(realFileName);

+ 1 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/VideoSceneProgressServiceImpl.java

@@ -96,7 +96,7 @@ public class VideoSceneProgressServiceImpl extends ServiceImpl<IVideoSceneProgre
     public ResultData rebuildVideoSceneProgress(RebuildVedioSceneParamVO param) throws Exception {
 
         if(StringUtils.isEmpty(param.getNum())){
-            throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
+            throw new BusinessException(ErrorCode.PARAM_REQUIRED);
         }
 
         ScenePro scenePro = sceneProService.findBySceneNum(param.getNum());