fix commentcount
This commit is contained in:
parent
cdcdb64d60
commit
33ace4db2a
@ -99,7 +99,8 @@ public class CommentManager {
|
||||
return count(target);
|
||||
}
|
||||
|
||||
return commentRepository.count(qComment.target.eq(target).and(qComment.parent.eq(parent)));
|
||||
return commentRepository.count(qComment.target.eq(target).and(qComment.parent.eq(parent))
|
||||
.and(qComment.created.before(Instant.now())));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -109,7 +110,8 @@ public class CommentManager {
|
||||
* @return the long
|
||||
*/
|
||||
public Long count(Long target) {
|
||||
return commentRepository.count(qComment.target.eq(target));
|
||||
return commentRepository
|
||||
.count(qComment.target.eq(target).and(qComment.created.before(Instant.now())));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user