Browse Source

场景升级 修改up.xml的url为v4目录的url

dsx 2 năm trước cách đây
mục cha
commit
e3ebccf729

+ 5 - 1
src/main/java/com/fdkankan/scene/service/impl/SceneUpgradeToV4Service.java

@@ -387,11 +387,15 @@ public class SceneUpgradeToV4Service implements ISceneUpgradeToV4Service {
 
 
             scenePlusExt.setThumb(thumbUrl);
             scenePlusExt.setThumb(thumbUrl);
             scenePlusExt.setWebSite(webSite);
             scenePlusExt.setWebSite(webSite);
-            String upXMLUrl = "https://4dkk.4dage.com/" + String.format(UploadFilePath.DATA_VIEW_PATH, num) + "Up.xml";
             if(StrUtil.isNotEmpty(scenePlusExt.getVideos())){
             if(StrUtil.isNotEmpty(scenePlusExt.getVideos())){
                 JSONObject videosJson = JSON.parseObject(scenePlusExt.getVideos());
                 JSONObject videosJson = JSON.parseObject(scenePlusExt.getVideos());
                 String upPath = videosJson.getString("upPath");
                 String upPath = videosJson.getString("upPath");
                 if(StrUtil.isNotEmpty(upPath)){
                 if(StrUtil.isNotEmpty(upPath)){
+                    String fileName = "Up.txt";
+                    if(!fYunFileService.fileExist(dataViewPath + fileName)){
+                        fileName = "Up.xml";
+                    }
+                    String upXMLUrl = "https://4dkk.4dage.com/" + dataViewPath + fileName;
                     videosJson.replace("upPath", upXMLUrl);
                     videosJson.replace("upPath", upXMLUrl);
                     scenePlusExt.setVideos(videosJson.toJSONString());
                     scenePlusExt.setVideos(videosJson.toJSONString());
                 }
                 }