|
@@ -114,16 +114,17 @@ public class OpsServiceImpl implements OpsService {
|
|
|
|
|
|
List<String> list = Arrays.asList(sceneCodes);
|
|
|
// tourXml路径
|
|
|
- String tourPath;
|
|
|
+ String downloadPath;
|
|
|
String basePath = configConstant.serverBasePath;
|
|
|
int size = list.size();
|
|
|
String firstTourPath = basePath + File.separator + list.get(0) + "/vtour/tour.xml";
|
|
|
if (size == 1){
|
|
|
- tourPath = firstTourPath;
|
|
|
+ downloadPath = firstTourPath;
|
|
|
} else {
|
|
|
// 获取scene标签集合
|
|
|
StringBuffer sceneLabels = new StringBuffer();
|
|
|
int i = 0;
|
|
|
+ String tourPath;
|
|
|
for (String sceneCode : list) {
|
|
|
tourPath = basePath + File.separator + sceneCode + "/vtour/tour.xml";
|
|
|
String scene = getSceneLabel(tourPath);
|
|
@@ -140,15 +141,14 @@ public class OpsServiceImpl implements OpsService {
|
|
|
buffer.append(sceneLabels).append(" ");
|
|
|
buffer.append("</krpano>");
|
|
|
// 保存路径
|
|
|
- String tourXmlPath = "/download/" + workId + "_tour.xml";
|
|
|
- String savePath = configConstant.serverBasePath + File.separator + tourXmlPath;
|
|
|
+ downloadPath = "/download/" + workId + "_tour.xml";
|
|
|
+ String savePath = configConstant.serverBasePath + File.separator + downloadPath;
|
|
|
FileUtil.writeUtf8String(buffer.toString(), savePath);
|
|
|
log.info("合并完成,保存路径: {}", savePath);
|
|
|
- tourPath = tourXmlPath;
|
|
|
|
|
|
}
|
|
|
|
|
|
- return Result.success(tourPath);
|
|
|
+ return Result.success(downloadPath);
|
|
|
}
|
|
|
|
|
|
/**
|