|
|
@@ -6,7 +6,7 @@ import cn.reghao.tnb.common.auth.UserContext;
|
|
|
import cn.reghao.tnb.content.app.vod.db.mapper.PostTagMapper;
|
|
|
import cn.reghao.tnb.content.app.vod.db.mapper.VideoPostTagMapper;
|
|
|
import cn.reghao.tnb.content.app.vod.model.po.PostTag;
|
|
|
-import cn.reghao.tnb.content.app.vod.model.po.VideoPostTag;
|
|
|
+import cn.reghao.tnb.content.app.vod.model.po.VideoTag;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
@@ -40,16 +40,16 @@ public class TagService {
|
|
|
}
|
|
|
|
|
|
List<PostTag> list = new ArrayList<>();
|
|
|
- List<VideoPostTag> list1 = new ArrayList<>();
|
|
|
+ List<VideoTag> list1 = new ArrayList<>();
|
|
|
for (String str : tags.split(",")) {
|
|
|
String tag = StringUtils.trimAllWhitespace(str);
|
|
|
PostTag postTag = postTagMapper.findByName(tag);
|
|
|
if (postTag != null) {
|
|
|
- list1.add(new VideoPostTag(videoId, scope, postTag.getTagId()));
|
|
|
+ list1.add(new VideoTag(videoId, scope, postTag.getTagId()));
|
|
|
} else {
|
|
|
String tagId = UUID.randomUUID().toString().replace("-", "");
|
|
|
list.add(new PostTag(tagId, tag));
|
|
|
- list1.add(new VideoPostTag(videoId, scope, tagId));
|
|
|
+ list1.add(new VideoTag(videoId, scope, tagId));
|
|
|
}
|
|
|
}
|
|
|
|