Skip to content

Commit 5189d5c

Browse files
authored
Merge pull request #223 from TeamLearningFlow/develop
Develop
2 parents ca617f5 + d2a8fb6 commit 5189d5c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/learningFlow/learningFlow_BE/repository/UserCollectionRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
public 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

src/main/java/learningFlow/learningFlow_BE/service/user/UserService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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 -> {

0 commit comments

Comments
 (0)