|
@@ -22,6 +22,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
import com.xxl.job.core.context.XxlJobHelper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
/**
|
|
@@ -35,6 +36,9 @@ import org.springframework.stereotype.Service;
|
|
|
@Service
|
|
|
public class RepairUpXmlUrlServiceImpl implements IRepairUpXmlUrlService {
|
|
|
|
|
|
+ @Value("${fyun.host}")
|
|
|
+ private String fyunHost;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ISceneProService sceneProService;
|
|
|
@Autowired
|
|
@@ -68,7 +72,7 @@ public class RepairUpXmlUrlServiceImpl implements IRepairUpXmlUrlService {
|
|
|
}
|
|
|
|
|
|
int index = 0;
|
|
|
- int size = 1;
|
|
|
+ int size = 200;
|
|
|
boolean exit = false;
|
|
|
List<ScenePlusExt> plusExtList = new ArrayList<>();
|
|
|
do {
|
|
@@ -76,6 +80,7 @@ public class RepairUpXmlUrlServiceImpl implements IRepairUpXmlUrlService {
|
|
|
List<ScenePlusExt> subList = scenePlusExtService.list(scenePlusExtQueryWrapper);
|
|
|
if(CollUtil.isNotEmpty(subList)){
|
|
|
plusExtList.addAll(subList);
|
|
|
+ index += size;
|
|
|
}else{
|
|
|
exit = true;
|
|
|
}
|
|
@@ -100,17 +105,21 @@ public class RepairUpXmlUrlServiceImpl implements IRepairUpXmlUrlService {
|
|
|
if(StrUtil.isEmpty(num)){
|
|
|
return false;
|
|
|
}
|
|
|
- String url = "https://4dkk.4dage.com/" + String.format(UploadFilePath.DATA_VIEW_PATH, num) + "Up.xml";
|
|
|
JSONObject videosJson = JSON.parseObject(videos);
|
|
|
String upPath = videosJson.getString("upPath");
|
|
|
if (StrUtil.isEmpty(upPath)) {
|
|
|
return false;
|
|
|
} else
|
|
|
//判断是否包含
|
|
|
- if (upPath.contains("/data/data") || (upPath.contains("scene_view_data") && !upPath
|
|
|
- .contains(num))) {
|
|
|
+ if (upPath.contains("/data/data") || (upPath.contains("scene_view_data") && !upPath.contains(num))) {
|
|
|
+ String dataViewPath = String.format(UploadFilePath.DATA_VIEW_PATH, num);
|
|
|
//修复数据库
|
|
|
- videosJson.replace("upPath", url);
|
|
|
+ String fileName = "Up.txt";
|
|
|
+ if(!fYunFileServiceInterface.fileExist(dataViewPath + fileName)){
|
|
|
+ fileName = "Up.xml";
|
|
|
+ }
|
|
|
+ String upXMLUrl = fyunHost + dataViewPath + fileName;
|
|
|
+ videosJson.replace("upPath", upXMLUrl);
|
|
|
ext.setVideos(videosJson.toJSONString());
|
|
|
|
|
|
//修复scene.json
|