|
@@ -258,7 +258,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
FileUtils.writeFile(localSceneJsonPath, JSON.toJSONString(sceneJson));
|
|
FileUtils.writeFile(localSceneJsonPath, JSON.toJSONString(sceneJson));
|
|
//上传sceneJson文件
|
|
//上传sceneJson文件
|
|
String sceneJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH+"scene.json", num);
|
|
String sceneJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH+"scene.json", num);
|
|
- ossUtil.uploadFileBytes(sceneJsonPath, JSON.toJSONBytes(sceneJson));
|
|
|
|
|
|
+ ossUtil.uploadFileBytes(sceneJsonPath, JSON.toJSONString(sceneJson).getBytes(StandardCharsets.UTF_8));
|
|
|
|
|
|
//sceneJson放入缓存
|
|
//sceneJson放入缓存
|
|
String key = String.format(RedisKey.SCENE_JSON, num);
|
|
String key = String.format(RedisKey.SCENE_JSON, num);
|
|
@@ -303,7 +303,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
linkPanArr.add(JSON.parseObject(linkPan));
|
|
linkPanArr.add(JSON.parseObject(linkPan));
|
|
});
|
|
});
|
|
String linkScenePath = userEditPath + "links.json";
|
|
String linkScenePath = userEditPath + "links.json";
|
|
- ossUtil.uploadFileBytes(linkScenePath, linkPanArr.toString().getBytes());
|
|
|
|
|
|
+ ossUtil.uploadFileBytes(linkScenePath, linkPanArr.toString().getBytes(StandardCharsets.UTF_8));
|
|
|
|
|
|
//拷贝编辑目录到发布目录
|
|
//拷贝编辑目录到发布目录
|
|
ossUtil.deleteObject(imgViewPath + "panorama");
|
|
ossUtil.deleteObject(imgViewPath + "panorama");
|
|
@@ -326,7 +326,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
jsonhots.add(JSONObject.parseObject(hot));
|
|
jsonhots.add(JSONObject.parseObject(hot));
|
|
});
|
|
});
|
|
String hotJsonPath = String.format(UploadFilePath.USER_EDIT_PATH, sceneNum) + "hot.json";
|
|
String hotJsonPath = String.format(UploadFilePath.USER_EDIT_PATH, sceneNum) + "hot.json";
|
|
- ossUtil.uploadFileBytes(hotJsonPath, jsonhots.toString().getBytes());
|
|
|
|
|
|
+ ossUtil.uploadFileBytes(hotJsonPath, jsonhots.toString().getBytes(StandardCharsets.UTF_8));
|
|
|
|
|
|
//修改tags状态为是,标识有热点数据
|
|
//修改tags状态为是,标识有热点数据
|
|
this.saveTagsToSceneEditInfo(sceneNum, sceneEditInfo);
|
|
this.saveTagsToSceneEditInfo(sceneNum, sceneEditInfo);
|
|
@@ -477,7 +477,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
if(StrUtil.isNotEmpty(floorJsonData)){
|
|
if(StrUtil.isNotEmpty(floorJsonData)){
|
|
JSONObject houseTypeJson = CreateHouseJsonUtil
|
|
JSONObject houseTypeJson = CreateHouseJsonUtil
|
|
.createHouseTypeJsonByUser(localDataPath + "floorplan_user.json");
|
|
.createHouseTypeJsonByUser(localDataPath + "floorplan_user.json");
|
|
- ossUtil.uploadFileBytes(editUserPath + "houseType.json", houseTypeJson.toJSONString().getBytes());
|
|
|
|
|
|
+ ossUtil.uploadFileBytes(editUserPath + "houseType.json", houseTypeJson.toJSONString().getBytes(StandardCharsets.UTF_8));
|
|
|
|
|
|
floorPlanUser = CommonStatus.YES.code();
|
|
floorPlanUser = CommonStatus.YES.code();
|
|
}
|
|
}
|
|
@@ -597,7 +597,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
}
|
|
}
|
|
|
|
|
|
String hourseTypeJsonPath = String.format(UploadFilePath.USER_EDIT_PATH, num) + "houseType.json";
|
|
String hourseTypeJsonPath = String.format(UploadFilePath.USER_EDIT_PATH, num) + "houseType.json";
|
|
- ossUtil.uploadFileBytes(hourseTypeJsonPath, result.toJSONString().getBytes());
|
|
|
|
|
|
+ ossUtil.uploadFileBytes(hourseTypeJsonPath, result.toJSONString().getBytes(StandardCharsets.UTF_8));
|
|
}
|
|
}
|
|
|
|
|
|
private JSONArray[] createHouseTypeJsonHandler(JSONObject floor){
|
|
private JSONArray[] createHouseTypeJsonHandler(JSONObject floor){
|
|
@@ -713,7 +713,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
}
|
|
}
|
|
item.put("name", name);
|
|
item.put("name", name);
|
|
}
|
|
}
|
|
- ossUtil.uploadFileBytes(key, jsonObject.toJSONString().getBytes());
|
|
|
|
|
|
+ ossUtil.uploadFileBytes(key, jsonObject.toJSONString().getBytes(StandardCharsets.UTF_8));
|
|
return ResultData.ok();
|
|
return ResultData.ok();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1288,7 +1288,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
String objectContent = ossUtil.getFileContent(objectName);
|
|
String objectContent = ossUtil.getFileContent(objectName);
|
|
SceneJsonBean sceneJsonBean = JSON.parseObject(objectContent, SceneJsonBean.class);
|
|
SceneJsonBean sceneJsonBean = JSON.parseObject(objectContent, SceneJsonBean.class);
|
|
sceneJsonBean.setVersion(sceneJsonBean.getVersion() +1);
|
|
sceneJsonBean.setVersion(sceneJsonBean.getVersion() +1);
|
|
- ossUtil.uploadFileBytes(objectName, JSON.toJSONString(sceneJsonBean).getBytes());
|
|
|
|
|
|
+ ossUtil.uploadFileBytes(objectName, JSON.toJSONString(sceneJsonBean).getBytes(StandardCharsets.UTF_8));
|
|
redisUtil.set(key, JSON.toJSONString(sceneJsonBean));
|
|
redisUtil.set(key, JSON.toJSONString(sceneJsonBean));
|
|
}
|
|
}
|
|
|
|
|