|
@@ -1360,17 +1360,17 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
|
|
String oldEditPath = String.format(UploadFilePath.EDIT_PATH, num);
|
|
String oldEditPath = String.format(UploadFilePath.EDIT_PATH, num);
|
|
|
|
|
|
String newEditPath = String.format(UploadFilePath.EDIT_PATH, newNum);
|
|
String newEditPath = String.format(UploadFilePath.EDIT_PATH, newNum);
|
|
- uploadToOssUtil.copyFiles(oldEditPath,newEditPath);
|
|
|
|
|
|
+ uploadToOssUtil.copyFiles(oldEditPath, newEditPath);
|
|
|
|
|
|
// 拷贝场景展示资源
|
|
// 拷贝场景展示资源
|
|
String oldViewPath = String.format(UploadFilePath.VIEW_PATH, num);
|
|
String oldViewPath = String.format(UploadFilePath.VIEW_PATH, num);
|
|
String newViewPath = String.format(UploadFilePath.VIEW_PATH, newNum);
|
|
String newViewPath = String.format(UploadFilePath.VIEW_PATH, newNum);
|
|
- uploadToOssUtil.copyFiles(oldViewPath,newViewPath);
|
|
|
|
|
|
+ uploadToOssUtil.copyFiles(oldViewPath, newViewPath);
|
|
|
|
|
|
// 拷贝本地资源
|
|
// 拷贝本地资源
|
|
String oldPath = String.format("/mnt/4Dkankan/scene/%s/caches/images/", num);
|
|
String oldPath = String.format("/mnt/4Dkankan/scene/%s/caches/images/", num);
|
|
String newPath = String.format("/mnt/4Dkankan/scene/%s/caches/images/", newNum);
|
|
String newPath = String.format("/mnt/4Dkankan/scene/%s/caches/images/", newNum);
|
|
- FileUtils.copyDirectiory(oldPath,newPath);
|
|
|
|
|
|
+ FileUtils.copyDirectiory(oldPath, newPath);
|
|
|
|
|
|
String scenePath = ConstantFilePath.SCENE_V4_PATH + num;
|
|
String scenePath = ConstantFilePath.SCENE_V4_PATH + num;
|
|
String newScenePath = ConstantFilePath.SCENE_V4_PATH + newNum;
|
|
String newScenePath = ConstantFilePath.SCENE_V4_PATH + newNum;
|
|
@@ -1379,10 +1379,10 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
|
|
// 拷贝数据
|
|
// 拷贝数据
|
|
Long proId = scenePro.getId();
|
|
Long proId = scenePro.getId();
|
|
scenePro.setId(paramVO.getNewSceneProId());
|
|
scenePro.setId(paramVO.getNewSceneProId());
|
|
- scenePro.setWebSite(scenePro.getWebSite().replace(num,newNum));
|
|
|
|
|
|
+ scenePro.setWebSite(scenePro.getWebSite().replace(num, newNum));
|
|
scenePro.setSceneName(paramVO.getNewSceneName());
|
|
scenePro.setSceneName(paramVO.getNewSceneName());
|
|
- scenePro.setThumb(scenePro.getThumb().replace(num,newNum));
|
|
|
|
- scenePro.setVideos(scenePro.getVideos().replaceAll("https://4dkk.4dage.com/data/data"+num,"https://4dkk.4dage.com/scene_view_data/"+newNum+"/data"));
|
|
|
|
|
|
+ scenePro.setThumb(scenePro.getThumb().replace(num, newNum));
|
|
|
|
+ scenePro.setVideos(scenePro.getVideos().replaceAll("https://4dkk.4dage.com/data/data" + num, "https://4dkk.4dage.com/scene_view_data/" + newNum + "/data"));
|
|
scenePro.setNum(newNum);
|
|
scenePro.setNum(newNum);
|
|
sceneProService.saveOrUpdate(scenePro);
|
|
sceneProService.saveOrUpdate(scenePro);
|
|
|
|
|
|
@@ -1404,8 +1404,8 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
|
|
plusExt.setId(null);
|
|
plusExt.setId(null);
|
|
plusExt.setPlusId(scenePlus.getId());
|
|
plusExt.setPlusId(scenePlus.getId());
|
|
plusExt.setDataSource(paramVO.getDatasource());
|
|
plusExt.setDataSource(paramVO.getDatasource());
|
|
- plusExt.setWebSite(plusExt.getWebSite().replace(num,newNum));
|
|
|
|
- plusExt.setThumb(plusExt.getThumb().replace(num,newNum));
|
|
|
|
|
|
+ plusExt.setWebSite(plusExt.getWebSite().replace(num, newNum));
|
|
|
|
+ plusExt.setThumb(plusExt.getThumb().replace(num, newNum));
|
|
plusExt.setVideos(scenePro.getVideos());
|
|
plusExt.setVideos(scenePro.getVideos());
|
|
scenePlusExtService.save(plusExt);
|
|
scenePlusExtService.save(plusExt);
|
|
|
|
|
|
@@ -1447,15 +1447,5 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
|
|
|
|
|
|
String sceneJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH+"scene.json", num);
|
|
String sceneJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH+"scene.json", num);
|
|
uploadToOssUtil.upload(JSON.toJSONBytes(sceneJson), sceneJsonPath);
|
|
uploadToOssUtil.upload(JSON.toJSONBytes(sceneJson), sceneJsonPath);
|
|
-
|
|
|
|
-
|
|
|
|
- // 生成二维码
|
|
|
|
- String sceneUrl = mainUrl + "/" + sceneProNewUrl;
|
|
|
|
- String outPathZh = ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/" + num + ".png";
|
|
|
|
- String outPathEn = ConstantFilePath.BASE_PATH + File.separator + "sceneQRcode/" + num + "_en.png";
|
|
|
|
- MatrixToImageWriterUtil.createQRCode(sceneUrl + num, outPathZh, false,null);
|
|
|
|
- MatrixToImageWriterUtil.createQRCode(sceneUrl + num + "&lang=en", outPathEn, false, null);
|
|
|
|
- uploadToOssUtil.upload(outPathZh, String.format(UploadFilePath.DOWNLOADS_QRCODE, num) + num + ".png");
|
|
|
|
- uploadToOssUtil.upload(outPathEn, String.format(UploadFilePath.DOWNLOADS_QRCODE, num) + num + "_en.png");
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|