Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,6 @@ void updateRepresentativeStatus(
@Param("userId") Long userId,
@Param("scenarioId") Long scenarioId
);

int countByUserIdAndDecisionLineIsNotNullAndStatus(Long userId, ScenarioStatus status);
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public UserStatsResponse getMyStats(Long userId) {
User user = userRepository.findById(userId)
.orElseThrow(() -> new EntityNotFoundException("User not found: " + userId));

int scenarioCount = scenarioRepository.countByUserId(userId);
int scenarioCount = scenarioRepository.countByUserIdAndDecisionLineIsNotNullAndStatus(
userId, ScenarioStatus.COMPLETED);
int totalPoints = scenarioRepository.sumTotalByUserId(userId);
int postCount = postRepository.countByUserId(userId);
int commentCount = commentRepository.countByUserId(userId);
Expand Down