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