File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/main/java/learningFlow/learningFlow_BE Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1414
1515public interface UserCollectionRepository extends JpaRepository <UserCollection , Long > {
1616 Optional <UserCollection > findByUserAndCollection (User user , Collection collection );
17- List <UserCollection > findByUserAndStatusOrderByCompletedTimeDesc (User user , UserCollectionStatus status );
17+ List <UserCollection > findByUserAndStatusOrderByUpdatedAtDesc (User user , UserCollectionStatus status );
1818 Optional <UserCollection > findFirstByUserAndStatusOrderByUpdatedAtDesc (User user , UserCollectionStatus status );
1919
2020 @ Modifying
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ public UserResponseDTO.UserMyPageResponseDTO getUserMyPageResponseDTO(String log
214214 .orElseThrow (() -> new UserHandler (ErrorStatus .USER_NOT_FOUND ));
215215
216216 List <UserCollection > inProgressUserCollectionList
217- = userCollectionRepository .findByUserAndStatusOrderByCompletedTimeDesc (user , UserCollectionStatus .IN_PROGRESS );
217+ = userCollectionRepository .findByUserAndStatusOrderByUpdatedAtDesc (user , UserCollectionStatus .IN_PROGRESS );
218218
219219 List <ResourceResponseDTO .RecentlyWatchedEpisodeDTO > recentlyWatchedEpisodeDTOList = inProgressUserCollectionList .stream ()
220220 .map (userCollection -> {
@@ -237,7 +237,7 @@ public UserResponseDTO.UserMyPageResponseDTO getUserMyPageResponseDTO(String log
237237
238238
239239 List <UserCollection > completedUserCollectionList
240- = userCollectionRepository .findByUserAndStatusOrderByCompletedTimeDesc (user , UserCollectionStatus .COMPLETED );
240+ = userCollectionRepository .findByUserAndStatusOrderByUpdatedAtDesc (user , UserCollectionStatus .COMPLETED );
241241
242242 List <CollectionResponseDTO .CollectionPreviewDTO > completedCollectionList = completedUserCollectionList .stream ()
243243 .map (userCollection -> {
You can’t perform that action at this time.
0 commit comments