|
@@ -113,28 +113,28 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
throw new BusinessException(ResultCode.CAMERA_EMPTY);
|
|
throw new BusinessException(ResultCode.CAMERA_EMPTY);
|
|
}
|
|
}
|
|
|
|
|
|
-// Long needSpace = 0L;
|
|
|
|
-// if(scenePro != null){
|
|
|
|
-// needSpace = scenePro.getSpace();
|
|
|
|
-// }
|
|
|
|
-// if(scenePlus != null){
|
|
|
|
-// ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
|
|
-// if(scenePlusExt != null && scenePlusExt.getSpace() != null){
|
|
|
|
-// needSpace = scenePlusExt.getSpace();
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// Boolean checkSpace = cameraDetailService.checkSpace(detailEntity, needSpace);
|
|
|
|
-//
|
|
|
|
-// if(!checkSpace){
|
|
|
|
-// throw new BusinessException(ResultCode.CAMERA_SPACE_ERROR);
|
|
|
|
-// }
|
|
|
|
|
|
+ Long needSpace = 0L;
|
|
|
|
+ if(scenePro != null){
|
|
|
|
+ needSpace = scenePro.getSpace();
|
|
|
|
+ }
|
|
|
|
+ if(scenePlus != null){
|
|
|
|
+ ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
|
|
+ if(scenePlusExt != null && scenePlusExt.getSpace() != null){
|
|
|
|
+ needSpace = scenePlusExt.getSpace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ Boolean checkSpace = cameraDetailService.checkSpace(detailEntity, needSpace);
|
|
|
|
+
|
|
|
|
+ if(!checkSpace){
|
|
|
|
+ throw new BusinessException(ResultCode.CAMERA_SPACE_ERROR);
|
|
|
|
+ }
|
|
|
|
|
|
HashMap<String, Object> param = new HashMap<>();
|
|
HashMap<String, Object> param = new HashMap<>();
|
|
param.put("num",sceneNum);
|
|
param.put("num",sceneNum);
|
|
JSONObject jsonObject = fdKKClient.copyScene(param, "m_a_n_a_g_e");
|
|
JSONObject jsonObject = fdKKClient.copyScene(param, "m_a_n_a_g_e");
|
|
Integer code = jsonObject.getInteger("code");
|
|
Integer code = jsonObject.getInteger("code");
|
|
if(code != 0){
|
|
if(code != 0){
|
|
- throw new BusinessException(jsonObject.getInteger("code"),jsonObject.getString("message"));
|
|
|
|
|
|
+ throw new BusinessException(jsonObject.getInteger("code"),jsonObject.getString("msg"));
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|