|
@@ -162,15 +162,22 @@ public class UploadSceneListener {
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_4002.code(), ErrorCode.FAILURE_CODE_4002.formatMessage("scene.json"));
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_4002.code(), ErrorCode.FAILURE_CODE_4002.formatMessage("scene.json"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //复制展示页文件
|
|
|
SceneJsonBean sceneJsonBean = JSONObject.parseObject(FileUtil.readUtf8String(sceneJsonFile), SceneJsonBean.class);
|
|
SceneJsonBean sceneJsonBean = JSONObject.parseObject(FileUtil.readUtf8String(sceneJsonFile), SceneJsonBean.class);
|
|
|
String sceneViewDataPath = "/oss/4dkankan/" + String.format(UploadFilePath.VIEW_PATH, num);
|
|
String sceneViewDataPath = "/oss/4dkankan/" + String.format(UploadFilePath.VIEW_PATH, num);
|
|
|
- String sceneEditDataPath = "/oss/4dkankan/" + String.format(UploadFilePath.EDIT_PATH, num);
|
|
|
|
|
FileUtil.mkdir(sceneViewDataPath);
|
|
FileUtil.mkdir(sceneViewDataPath);
|
|
|
- FileUtil.mkdir(sceneEditDataPath);
|
|
|
|
|
String cpCmd = "cp -p -r " + sourcePath + "/env/wwwroot/scene_view_data/" + num +"/* " + sceneViewDataPath;
|
|
String cpCmd = "cp -p -r " + sourcePath + "/env/wwwroot/scene_view_data/" + num +"/* " + sceneViewDataPath;
|
|
|
- String cpEditUserCmd = "cp -p -r " + sourcePath + "/env/wwwroot/scene_view_data/" + num +"/user " + sceneEditDataPath;
|
|
|
|
|
CmdUtils.callLineSh(cpCmd);
|
|
CmdUtils.callLineSh(cpCmd);
|
|
|
|
|
+
|
|
|
|
|
+ //复制编辑页文件
|
|
|
|
|
+ String sceneEditDataPath = "/oss/4dkankan/" + String.format(UploadFilePath.EDIT_PATH, num);
|
|
|
|
|
+ FileUtil.mkdir(sceneEditDataPath);
|
|
|
|
|
+ //复制user
|
|
|
|
|
+ String cpEditUserCmd = "cp -p -r " + sourcePath + "/env/wwwroot/scene_view_data/" + num +"/user " + sceneEditDataPath;
|
|
|
CmdUtils.callLineSh(cpEditUserCmd);
|
|
CmdUtils.callLineSh(cpEditUserCmd);
|
|
|
|
|
+ //复制全景关联
|
|
|
|
|
+ String cpEditLinkPanCmd = "cp -p -r " + sourcePath + "/env/wwwroot/scene_view_data/" + num +"/images/panorama " + sceneEditDataPath + "/images";
|
|
|
|
|
+ CmdUtils.callLineSh(cpEditLinkPanCmd);
|
|
|
|
|
|
|
|
sceneJsonBean.setUploadType("offline");
|
|
sceneJsonBean.setUploadType("offline");
|
|
|
String sceneJsonKey = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "scene.json";
|
|
String sceneJsonKey = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "scene.json";
|