|
@@ -126,17 +126,18 @@ public class RepairUpXmlUrlServiceImpl implements IRepairUpXmlUrlService {
|
|
ext.setVideos(videosJson.toJSONString());
|
|
ext.setVideos(videosJson.toJSONString());
|
|
|
|
|
|
//修复scene.json
|
|
//修复scene.json
|
|
- String sceneJsonPath =
|
|
|
|
- String.format(UploadFilePath.DATA_VIEW_PATH, num) + "scene.json";
|
|
|
|
|
|
+ String sceneJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "scene.json";
|
|
String sceneJsonStr = fYunFileServiceInterface.getFileContent(sceneJsonPath);
|
|
String sceneJsonStr = fYunFileServiceInterface.getFileContent(sceneJsonPath);
|
|
- JSONObject sceneJson = JSON.parseObject(sceneJsonStr);
|
|
|
|
- sceneJson.replace("videos", ext.getVideos());
|
|
|
|
- fYunFileServiceInterface
|
|
|
|
- .uploadFile(sceneJson.toJSONString().getBytes(StandardCharsets.UTF_8),
|
|
|
|
- sceneJsonPath);
|
|
|
|
|
|
+ if(StrUtil.isNotEmpty(sceneJsonStr)){
|
|
|
|
+ JSONObject sceneJson = JSON.parseObject(sceneJsonStr);
|
|
|
|
+ sceneJson.replace("videos", ext.getVideos());
|
|
|
|
+ fYunFileServiceInterface
|
|
|
|
+ .uploadFile(sceneJson.toJSONString().getBytes(StandardCharsets.UTF_8),
|
|
|
|
+ sceneJsonPath);
|
|
|
|
|
|
- //清除缓存
|
|
|
|
- redisUtil.del(String.format(RedisKey.SCENE_JSON, num));
|
|
|
|
|
|
+ //清除缓存
|
|
|
|
+ redisUtil.del(String.format(RedisKey.SCENE_JSON, num));
|
|
|
|
+ }
|
|
|
|
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|