|
@@ -145,7 +145,7 @@ public class VideoPostServiceImpl implements VideoPostService {
|
|
|
VideoStatistic videoStatistic = new VideoStatistic(videoId);
|
|
VideoStatistic videoStatistic = new VideoStatistic(videoId);
|
|
|
setVideoCategoryPost(videoPost);
|
|
setVideoCategoryPost(videoPost);
|
|
|
videoRepository.savePostVideo(videoFile, videoPost, videoStatistic);
|
|
videoRepository.savePostVideo(videoFile, videoPost, videoStatistic);
|
|
|
- setVideoTags(videoId, tags);
|
|
|
|
|
|
|
+ setVideoTags(videoId, videoPost.getScope(), tags);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Deprecated
|
|
@Deprecated
|
|
@@ -167,7 +167,7 @@ public class VideoPostServiceImpl implements VideoPostService {
|
|
|
String videoId = videoPost.getVideoId();
|
|
String videoId = videoPost.getVideoId();
|
|
|
videoPostMapper.save(videoPost);
|
|
videoPostMapper.save(videoPost);
|
|
|
videoStatisticMapper.save(videoStatistic);
|
|
videoStatisticMapper.save(videoStatistic);
|
|
|
- setVideoTags(videoId, tags);
|
|
|
|
|
|
|
+ setVideoTags(videoId, videoPost.getScope(), tags);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void setVideoCategoryPost(VideoPost videoPost) {
|
|
private void setVideoCategoryPost(VideoPost videoPost) {
|
|
@@ -185,7 +185,7 @@ public class VideoPostServiceImpl implements VideoPostService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void setVideoTags(String videoId, String tags) {
|
|
|
|
|
|
|
+ private void setVideoTags(String videoId, int scope, String tags) {
|
|
|
if (tags.isBlank()) {
|
|
if (tags.isBlank()) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -196,11 +196,11 @@ public class VideoPostServiceImpl implements VideoPostService {
|
|
|
String tag = StringUtils.trimAllWhitespace(str);
|
|
String tag = StringUtils.trimAllWhitespace(str);
|
|
|
VideoTag videoTag = videoTagMapper.findByName(tag);
|
|
VideoTag videoTag = videoTagMapper.findByName(tag);
|
|
|
if (videoTag != null) {
|
|
if (videoTag != null) {
|
|
|
- list1.add(new VideoPostTag(videoId, videoTag.getTagId()));
|
|
|
|
|
|
|
+ list1.add(new VideoPostTag(videoId, scope, videoTag.getTagId()));
|
|
|
} else {
|
|
} else {
|
|
|
String tagId = UUID.randomUUID().toString().replace("-", "");
|
|
String tagId = UUID.randomUUID().toString().replace("-", "");
|
|
|
list.add(new VideoTag(tagId, tag));
|
|
list.add(new VideoTag(tagId, tag));
|
|
|
- list1.add(new VideoPostTag(videoId, tagId));
|
|
|
|
|
|
|
+ list1.add(new VideoPostTag(videoId, scope, tagId));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|