|
@@ -1,17 +1,13 @@
|
|
|
-package cn.reghao.tnb.content.app.data.service;
|
|
|
|
|
|
|
+package cn.reghao.tnb.search.app.comment.service;
|
|
|
|
|
|
|
|
import cn.reghao.jutil.jdk.web.db.PageList;
|
|
import cn.reghao.jutil.jdk.web.db.PageList;
|
|
|
import cn.reghao.jutil.jdk.string.SnowFlake;
|
|
import cn.reghao.jutil.jdk.string.SnowFlake;
|
|
|
import cn.reghao.tnb.account.api.iface.AccountQuery;
|
|
import cn.reghao.tnb.account.api.iface.AccountQuery;
|
|
|
import cn.reghao.tnb.common.auth.UserContext;
|
|
import cn.reghao.tnb.common.auth.UserContext;
|
|
|
import cn.reghao.tnb.content.api.dto.comment.CommentData;
|
|
import cn.reghao.tnb.content.api.dto.comment.CommentData;
|
|
|
-import cn.reghao.tnb.content.app.vod.db.mapper.VideoPostMapper;
|
|
|
|
|
-import cn.reghao.tnb.content.app.vod.db.mongo.UserCommentMongo;
|
|
|
|
|
-import cn.reghao.tnb.content.app.data.model.entity.UserComment;
|
|
|
|
|
-import cn.reghao.tnb.content.app.vod.model.po.VideoPost;
|
|
|
|
|
-import cn.reghao.tnb.message.api.constant.MsgType;
|
|
|
|
|
|
|
+import cn.reghao.tnb.search.app.comment.db.mongo.UserCommentMongo;
|
|
|
|
|
+import cn.reghao.tnb.search.app.comment.model.po.UserComment;
|
|
|
import cn.reghao.tnb.user.api.dto.UserCard;
|
|
import cn.reghao.tnb.user.api.dto.UserCard;
|
|
|
-import cn.reghao.tnb.message.api.dto.UserMessageDto;
|
|
|
|
|
import cn.reghao.tnb.user.api.iface.UserService;
|
|
import cn.reghao.tnb.user.api.iface.UserService;
|
|
|
import cn.reghao.tnb.content.api.dto.comment.CommentSbtDto;
|
|
import cn.reghao.tnb.content.api.dto.comment.CommentSbtDto;
|
|
|
import cn.reghao.tnb.content.api.dto.comment.ReplyUser;
|
|
import cn.reghao.tnb.content.api.dto.comment.ReplyUser;
|
|
@@ -35,12 +31,10 @@ public class CommentService {
|
|
|
|
|
|
|
|
private final SnowFlake idGenerator;
|
|
private final SnowFlake idGenerator;
|
|
|
private final UserCommentMongo userCommentMongo;
|
|
private final UserCommentMongo userCommentMongo;
|
|
|
- private final VideoPostMapper videoPostMapper;
|
|
|
|
|
|
|
|
|
|
- public CommentService(UserCommentMongo userCommentMongo, VideoPostMapper videoPostMapper) {
|
|
|
|
|
|
|
+ public CommentService(UserCommentMongo userCommentMongo) {
|
|
|
this.idGenerator = new SnowFlake(1L, 1L);
|
|
this.idGenerator = new SnowFlake(1L, 1L);
|
|
|
this.userCommentMongo = userCommentMongo;
|
|
this.userCommentMongo = userCommentMongo;
|
|
|
- this.videoPostMapper = videoPostMapper;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void saveComment(CommentSbtDto commentSbtDto) {
|
|
public void saveComment(CommentSbtDto commentSbtDto) {
|
|
@@ -64,7 +58,7 @@ public class CommentService {
|
|
|
UserComment userComment = new UserComment(commentId, commentData, parentId);
|
|
UserComment userComment = new UserComment(commentId, commentData, parentId);
|
|
|
userCommentMongo.save(userComment);
|
|
userCommentMongo.save(userComment);
|
|
|
|
|
|
|
|
- VideoPost videoPost = videoPostMapper.findByVideoId(postId);
|
|
|
|
|
|
|
+ /*VideoPost videoPost = videoPostMapper.findByVideoId(postId);
|
|
|
if (videoPost != null) {
|
|
if (videoPost != null) {
|
|
|
long publishBy = videoPost.getPublishBy();
|
|
long publishBy = videoPost.getPublishBy();
|
|
|
int msgType = MsgType.commentMsg.getValue();
|
|
int msgType = MsgType.commentMsg.getValue();
|
|
@@ -72,7 +66,7 @@ public class CommentService {
|
|
|
String content = "发表了新评论";
|
|
String content = "发表了新评论";
|
|
|
UserMessageDto userMessageDto = new UserMessageDto(msgType, title, content, publishBy);
|
|
UserMessageDto userMessageDto = new UserMessageDto(msgType, title, content, publishBy);
|
|
|
//userService.sendUserMessage(userMessageDto);
|
|
//userService.sendUserMessage(userMessageDto);
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Deprecated
|
|
@Deprecated
|