File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
back/src/main/java/com/back/domain Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -95,4 +95,6 @@ void updateRepresentativeStatus(
9595 @ Param ("userId" ) Long userId ,
9696 @ Param ("scenarioId" ) Long scenarioId
9797 );
98+
99+ int countByUserIdAndDecisionLineIsNotNullAndStatus (Long userId , ScenarioStatus status );
98100}
Original file line number Diff line number Diff line change @@ -55,7 +55,8 @@ public UserStatsResponse getMyStats(Long userId) {
5555 User user = userRepository .findById (userId )
5656 .orElseThrow (() -> new EntityNotFoundException ("User not found: " + userId ));
5757
58- int scenarioCount = scenarioRepository .countByUserId (userId );
58+ int scenarioCount = scenarioRepository .countByUserIdAndDecisionLineIsNotNullAndStatus (
59+ userId , ScenarioStatus .COMPLETED );
5960 int totalPoints = scenarioRepository .sumTotalByUserId (userId );
6061 int postCount = postRepository .countByUserId (userId );
6162 int commentCount = commentRepository .countByUserId (userId );
You can’t perform that action at this time.
0 commit comments