fix: ui 调整

This commit is contained in:
Tim
2025-08-21 12:27:50 +08:00
parent ed7dcd9414
commit 72e9a77373
4 changed files with 140 additions and 70 deletions

View File

@@ -49,6 +49,9 @@ public class PointService {
private int addPoint(User user, int amount, PointHistoryType type,
Post post, Comment comment, User fromUser) {
if (pointHistoryRepository.countByUser(user) == 0) {
recordHistory(user, PointHistoryType.SYSTEM_ONLINE, 0, null, null, null);
}
user.setPoint(user.getPoint() + amount);
userRepository.save(user);
recordHistory(user, type, amount, post, comment, fromUser);