From 927c852bdd86eea86a7f5a11cedfe2ce34185bca Mon Sep 17 00:00:00 2001 From: pkl0912 Date: Thu, 11 Jan 2024 20:33:26 +0900 Subject: [PATCH] =?UTF-8?q?#90=20[refactor]=20sort=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/domain/hair_service_record/ServiceRecordTerm.java | 3 +-- .../com/moddy/server/service/designer/DesignerService.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/moddy/server/domain/hair_service_record/ServiceRecordTerm.java b/src/main/java/com/moddy/server/domain/hair_service_record/ServiceRecordTerm.java index 7ba5b399..8e359eae 100644 --- a/src/main/java/com/moddy/server/domain/hair_service_record/ServiceRecordTerm.java +++ b/src/main/java/com/moddy/server/domain/hair_service_record/ServiceRecordTerm.java @@ -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; } diff --git a/src/main/java/com/moddy/server/service/designer/DesignerService.java b/src/main/java/com/moddy/server/service/designer/DesignerService.java index e0153b8d..fd101c71 100644 --- a/src/main/java/com/moddy/server/service/designer/DesignerService.java +++ b/src/main/java/com/moddy/server/service/designer/DesignerService.java @@ -157,7 +157,7 @@ public ApplicationDetailInfoResponse getApplicationDetail(Long userId, Long appl }).collect(Collectors.toList()); List hairServiceRecords = hairServiceRecordJpaRepository.findAllByHairModelApplicationId(applicationId); - hairServiceRecords.sort(Comparator.comparingInt(e -> e.getServiceRecordTerm().getOrder())); + hairServiceRecords.sort(Comparator.comparingInt(e -> e.getServiceRecordTerm().ordinal())); List preferRegions = preferRegionJpaRepository.findAllByUserId(userId);