添加显示最后评论时间的功能

This commit is contained in:
WilliamColton
2025-08-04 16:29:21 +08:00
parent 44e262a636
commit f6d7020165
4 changed files with 15 additions and 1 deletions

View File

@@ -76,6 +76,10 @@ public class CommentService {
return comment;
}
public java.time.LocalDateTime getLastCommentTimeOfUserByUserId(Long userId) { // 根据用户id查询该用户最后回复时间
return commentRepository.findLastCommentTimeOfUserByUserId(userId);
}
@Transactional
public Comment addReply(String username, Long parentId, String content) {
log.debug("addReply called by user {} for parent comment {}", username, parentId);