|
@@ -165,7 +165,10 @@ public class BuildScenePreServiceImpl implements IBuildScenePreService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void uploadFileMapHandler(String num, int cameraType, Map<String, String> map) {
|
|
|
+ public Map<String, String> uploadFileMapHandler(String num, int cameraType, Map<String, String> map) {
|
|
|
+ if(CollUtil.isEmpty(map)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
|
|
|
String dataPath = String.format("data/data%s/", num);
|
|
|
String imagePath = String.format("images/images%s/", num);
|
|
@@ -175,20 +178,21 @@ public class BuildScenePreServiceImpl implements IBuildScenePreService {
|
|
|
String imgViewPath = String.format(UploadFilePath.IMG_VIEW_PATH, num);
|
|
|
String videosViewPath = String.format(UploadFilePath.VIDEOS_VIEW_PATH, num);
|
|
|
|
|
|
+ Map<String, String> newMap = new HashMap<>();
|
|
|
map.entrySet().parallelStream().forEach(entry -> {
|
|
|
-
|
|
|
String key = entry.getKey();
|
|
|
String value = entry.getValue();
|
|
|
if(value.contains(dataPath)){
|
|
|
- map.put(key, value.replace(dataPath, dataViewPath));
|
|
|
+ newMap.put(key, value.replace(dataPath, dataViewPath));
|
|
|
}
|
|
|
if(value.contains(imagePath)){
|
|
|
- map.put(key, value.replace(imagePath, imgViewPath));
|
|
|
+ newMap.put(key, value.replace(imagePath, imgViewPath));
|
|
|
}
|
|
|
if(value.contains(videoPath)){
|
|
|
- map.put(key, value.replace(videoPath, videosViewPath));
|
|
|
+ newMap.put(key, value.replace(videoPath, videosViewPath));
|
|
|
}
|
|
|
});
|
|
|
+ return newMap;
|
|
|
}
|
|
|
|
|
|
@Override
|