mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-10 00:51:00 +08:00
fix: 旧帖子的last_reply_at也要及时更新(仅一次)
This commit is contained in:
@@ -83,7 +83,10 @@ public class PostMapper {
|
||||
dto.setParticipants(participants.stream().map(userMapper::toAuthorDto).collect(Collectors.toList()));
|
||||
|
||||
LocalDateTime last = post.getLastReplyAt();
|
||||
dto.setLastReplyAt(last != null ? last : post.getCreatedAt());
|
||||
if (last == null) {
|
||||
commentService.updatePostCommentStats(post);
|
||||
}
|
||||
dto.setLastReplyAt(post.getLastReplyAt());
|
||||
dto.setReward(0);
|
||||
dto.setSubscribed(false);
|
||||
dto.setType(post.getType());
|
||||
|
||||
Reference in New Issue
Block a user