|
@@ -93,7 +93,7 @@ public class VideoInfoServiceImpl extends BaseServiceImpl<Object> implements Vid
|
|
|
public void initData() {
|
|
public void initData() {
|
|
|
long startTime = System.currentTimeMillis();
|
|
long startTime = System.currentTimeMillis();
|
|
|
|
|
|
|
|
- DicCode dicCode = WebAppConfig.dicCodeList.stream().filter(x -> 1 == x.getType() && "pic_path".equals(x.getCodeKey())).findFirst().get();
|
|
|
|
|
|
|
+ DicCode dicCode = WebAppConfig.dicCodeList.stream().filter(x -> 1 == x.getType() && "qibing_path".equals(x.getCodeKey())).findFirst().get();
|
|
|
if (dicCode == null) {
|
|
if (dicCode == null) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -193,6 +193,11 @@ public class VideoInfoServiceImpl extends BaseServiceImpl<Object> implements Vid
|
|
|
System.err.println("error:" + file.getAbsolutePath());
|
|
System.err.println("error:" + file.getAbsolutePath());
|
|
|
System.err.println("error reason:" + e.getMessage());
|
|
System.err.println("error reason:" + e.getMessage());
|
|
|
}
|
|
}
|
|
|
|
|
+ } else if (!fileName.endsWith(".jpg") && !fileName.endsWith(".lnk")) {
|
|
|
|
|
+ String[] nameArr = fileName.substring(0, fileName.lastIndexOf(".")).split("\\s+");
|
|
|
|
|
+ String parentName = file.getParentFile().getName();
|
|
|
|
|
+
|
|
|
|
|
+ javAllInfo.getVideoUrlMap().put(nameArr[1], parentName.concat("/").concat(fileName));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -235,8 +240,10 @@ public class VideoInfoServiceImpl extends BaseServiceImpl<Object> implements Vid
|
|
|
|
|
|
|
|
// 保存影片信息
|
|
// 保存影片信息
|
|
|
List<VideoInfo> videoInfoList = javAllInfo.getVideoInfoList();
|
|
List<VideoInfo> videoInfoList = javAllInfo.getVideoInfoList();
|
|
|
- int videoInfoCount = videoInfoMapper.insertList(videoInfoList);
|
|
|
|
|
- System.out.println("videoInfoCount:" + videoInfoCount);
|
|
|
|
|
|
|
+ Map<String, String> videoUrlMap = javAllInfo.getVideoUrlMap();
|
|
|
|
|
+ videoInfoList.parallelStream().forEach(e -> {
|
|
|
|
|
+ e.setVideoUrl(videoUrlMap.get(e.getIdentificationCode()));
|
|
|
|
|
+ });
|
|
|
//for (VideoInfo videoInfo : videoInfoList) {
|
|
//for (VideoInfo videoInfo : videoInfoList) {
|
|
|
// try {
|
|
// try {
|
|
|
// videoInfoMapper.insert(videoInfo);
|
|
// videoInfoMapper.insert(videoInfo);
|
|
@@ -247,6 +254,9 @@ public class VideoInfoServiceImpl extends BaseServiceImpl<Object> implements Vid
|
|
|
// }
|
|
// }
|
|
|
//}
|
|
//}
|
|
|
|
|
|
|
|
|
|
+ int videoInfoCount = videoInfoMapper.insertList(videoInfoList);
|
|
|
|
|
+ System.out.println("videoInfoCount:" + videoInfoCount);
|
|
|
|
|
+
|
|
|
// 保存影片类别关联信息
|
|
// 保存影片类别关联信息
|
|
|
Set<VideoInfoGenres> videoInfoGenresSet = javAllInfo.getVideoInfoGenresSet();
|
|
Set<VideoInfoGenres> videoInfoGenresSet = javAllInfo.getVideoInfoGenresSet();
|
|
|
videoInfoGenresMapper.insertList(videoInfoGenresSet);
|
|
videoInfoGenresMapper.insertList(videoInfoGenresSet);
|