|
@@ -107,7 +107,14 @@ public class SceneListener {
|
|
|
//2,使用krpano工具生成全景图数据
|
|
|
List<ScenePanoEntity> scenePanoEntities=new ArrayList<>();
|
|
|
List<Map<String,Object>> scenes=new ArrayList<>();
|
|
|
- list.forEach(item->{
|
|
|
+ int index = 0;
|
|
|
+ for (String item : list) {
|
|
|
+ if (index % 2 != 0) {
|
|
|
+ index++;
|
|
|
+ continue; // 跳过不是偶数位置的元素
|
|
|
+ }
|
|
|
+ index++;
|
|
|
+ if (item.endsWith(".jpg")) {
|
|
|
log.info("key:{}",item);
|
|
|
Map<String,Object> scene=new HashMap<>();
|
|
|
String sceneCode = RandomUtils.getSceneCode("fd720_");
|
|
@@ -132,7 +139,8 @@ public class SceneListener {
|
|
|
String customId = generateCustomId();
|
|
|
scene.put("id", customId);
|
|
|
scenes.add(scene);
|
|
|
- });
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
log.info("场景切图完成组装json");
|
|
|
//3,修改json文件,并创建work作品表数据,增加作品类型为相机拍摄全景图
|
|
@@ -323,4 +331,15 @@ public class SceneListener {
|
|
|
String ossUrl = configConstant.ossDomain + ossKeyPath;
|
|
|
log.info("ossSomeData:{}", ossUrl);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ List<String> list=new ArrayList<>();
|
|
|
+ list.add("scene_view_data/KJ-t-QPqp92mGf1c/images/pan/high/0.jpg");
|
|
|
+ list.add("scene_view_data/KJ-t-QPqp92mGf1c/images/pan/high/1.jpg");
|
|
|
+ list.add("scene_view_data/KJ-t-QPqp92mGf1c/images/pan/high/3.jpg");
|
|
|
+ list.add("scene_view_data/KJ-t-QPqp92mGf1c/images/pan/high/4.jpg");
|
|
|
+ //循环只打印文件是偶数的图片
|
|
|
+
|
|
|
+ }
|
|
|
}
|