Skip to content

Commit

Permalink
[fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyeon330 committed Sep 6, 2023
1 parent 91f64a1 commit 8ccc569
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/check_in42/backend/user/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public List<ConferenceRoomDTO> findConferenceByAfterNowList (String intraId) {
final User user = this.findByName(intraId)
.orElseThrow(UserRunTimeException.NoUserException::new);
final List<ConferenceRoom> conferenceRoomList = user.getConferenceRooms();
Comparator<ConferenceRoom> descendingComparator = (v1, v2) -> v2.getId().compareTo(v1.getId());

Comparator<ConferenceRoom> descendingComparator = Comparator.comparing(ConferenceRoom::getDate);

final List<ConferenceRoomDTO> result = conferenceRoomList.stream()
.filter(room -> room.getDate().isAfter(LocalDate.now()) ||
(room.getDate().isEqual(LocalDate.now()) && (room.getReservationInfo() & ConferenceUtil.getAfterNowBit()) > 0))
Expand Down

0 comments on commit 8ccc569

Please sign in to comment.