|
|
|
@ -4,10 +4,7 @@ package com.luoo.comment.service;
|
|
|
|
|
import com.luoo.comment.client.JournalClient;
|
|
|
|
|
import com.luoo.comment.dao.CommentDao;
|
|
|
|
|
import com.luoo.comment.dao.CommentHisDao;
|
|
|
|
|
import com.luoo.comment.pojo.Comment;
|
|
|
|
|
import com.luoo.comment.pojo.CommentHis;
|
|
|
|
|
import com.luoo.comment.pojo.JournalRespDTO;
|
|
|
|
|
import com.luoo.comment.pojo.PublicationLike;
|
|
|
|
|
import com.luoo.comment.pojo.*;
|
|
|
|
|
import constants.Constants;
|
|
|
|
|
import dto.UserLoginDto;
|
|
|
|
|
import dto.UserMessageDto;
|
|
|
|
@ -54,6 +51,9 @@ public class CommentService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private CacheChannel cacheChannel;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private UserInfoService userInfoService;
|
|
|
|
|
|
|
|
|
|
public List<Comment> findAll(){
|
|
|
|
|
return commentDao.findAll();
|
|
|
|
|
}
|
|
|
|
@ -105,8 +105,10 @@ public class CommentService {
|
|
|
|
|
comment.setRootId(parentComment.getRootId());
|
|
|
|
|
comment.setRootJournalId(parentComment.getRootJournalId());
|
|
|
|
|
comment.setRootJournalName(parentComment.getRootJournalName());
|
|
|
|
|
comment.setReplyToNickname(parentComment.getNickName());
|
|
|
|
|
// comment.setReplyToNickname(parentComment.getNickName());
|
|
|
|
|
comment.setReplyToUserId(parentComment.getUserId());
|
|
|
|
|
UserInfo userInfo = userInfoService.findById(parentComment.getUserId());
|
|
|
|
|
comment.setReplyToNickname(userInfo.getNickName());
|
|
|
|
|
Query query = new Query();
|
|
|
|
|
query.addCriteria(Criteria.where("_id").is(comment.getRootId()));
|
|
|
|
|
Update update = new Update();
|
|
|
|
|