Skip to content

Commit

Permalink
#90 [refactor] sort 기능 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
pkl0912 committed Jan 11, 2024
1 parent 8b25c1a commit 927c852
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
@Getter
@AllArgsConstructor
public enum ServiceRecordTerm {
UNDER_ONE("1 개월 미만",1), ONE_THREE("1 - 3 개월",2), FOUR_SIX("4 - 6 개월",3), SEVEN_TWELVE("7 - 12 개월", 4), ABOVE_TWELVE("12 개월 초과", 5);
UNDER_ONE("1 개월 미만"), ONE_THREE("1 - 3 개월"), FOUR_SIX("4 - 6 개월"), SEVEN_TWELVE("7 - 12 개월"), ABOVE_TWELVE("12 개월 초과");

private final String value;
private final int order;
}
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public ApplicationDetailInfoResponse getApplicationDetail(Long userId, Long appl
}).collect(Collectors.toList());

List<HairServiceRecord> hairServiceRecords = hairServiceRecordJpaRepository.findAllByHairModelApplicationId(applicationId);
hairServiceRecords.sort(Comparator.comparingInt(e -> e.getServiceRecordTerm().getOrder()));
hairServiceRecords.sort(Comparator.comparingInt(e -> e.getServiceRecordTerm().ordinal()));

List <PreferRegion> preferRegions = preferRegionJpaRepository.findAllByUserId(userId);

Expand Down

0 comments on commit 927c852

Please sign in to comment.