|
|
@ -34,7 +34,7 @@ public class CommentMapper {
|
|
|
|
* 获取期刊总评论数 一级评论数加上父评论的总回复数
|
|
|
|
* 获取期刊总评论数 一级评论数加上父评论的总回复数
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
String totalString = (String) redisTemplate.opsForValue().get("JOURNAL_TATAL_COMMENT_COUNT___"+journalId);
|
|
|
|
String totalString = (String) redisTemplate.opsForValue().get("JOURNAL_TATAL_COMMENT_COUNT__"+journalId);
|
|
|
|
if (StringUtils.isNotBlank(totalString)) {
|
|
|
|
if (StringUtils.isNotBlank(totalString)) {
|
|
|
|
commentDTO.setTotalCommentReply(totalString);
|
|
|
|
commentDTO.setTotalCommentReply(totalString);
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
@ -58,7 +58,8 @@ public class CommentMapper {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
commentDTO.setTotalCommentReply(totalString);
|
|
|
|
commentDTO.setTotalCommentReply(totalString);
|
|
|
|
redisTemplate.opsForValue().set("JOURNAL_TATAL_COMMENT_COUNT___"+journalId,totalString,6,TimeUnit.HOURS);
|
|
|
|
commentDTO.setTotalCommentReplyInt(total);
|
|
|
|
|
|
|
|
redisTemplate.opsForValue().set("JOURNAL_TATAL_COMMENT_COUNT__"+journalId,totalString,6,TimeUnit.HOURS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|