From 41eeb07226aa750c491111265267aa09e522ef0e Mon Sep 17 00:00:00 2001 From: wuseong Date: Sun, 18 Feb 2024 16:38:38 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20experienceYear=EC=97=90=20=EB=A7=88?= =?UTF-8?q?=EC=9D=B4=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=20=EB=82=98?= =?UTF-8?q?=ED=83=80=EB=82=BC=20=EB=AC=B8=EC=9E=90=EC=97=B4=20=ED=95=84?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/user/enums/ExperienceYear.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/onnoff/onnoff/domain/user/enums/ExperienceYear.java b/src/main/java/com/onnoff/onnoff/domain/user/enums/ExperienceYear.java index a887f67..df757cb 100644 --- a/src/main/java/com/onnoff/onnoff/domain/user/enums/ExperienceYear.java +++ b/src/main/java/com/onnoff/onnoff/domain/user/enums/ExperienceYear.java @@ -10,18 +10,19 @@ @Getter public enum ExperienceYear { - THE_NEW("신입"), - THE_FIRST_YEAR("1년 이상 2년 미만"), - THE_SECOND_YEAR("2년 이상 3년 미만"), - THE_THIRD_YEAR("3년 이상 4년 미만"), - THE_FOURTH_YEAR("4년 이상 5년 미만"), - THE_FIFTH_YEAR_OR_MORE("5년 이상"), - THE_SENIOR("시니어"); - private final String value; + THE_NEW("신입", "신입"), + THE_FIRST_YEAR("1년 이상 2년 미만", "1년차"), + THE_SECOND_YEAR("2년 이상 3년 미만", "2년차"), + THE_THIRD_YEAR("3년 이상 4년 미만", "3년차"), + THE_FOURTH_YEAR("4년 이상 5년 미만", "4년차"), + THE_FIFTH_YEAR_OR_MORE("5년 이상", "5년차"), + THE_SENIOR("시니어", "시니어"); + private final String signupValue; + private final String mypageValue; public static ExperienceYear fromValue(String value) { for (ExperienceYear experienceYear : ExperienceYear.values()) { - if (experienceYear.getValue().equals(value)) { + if (experienceYear.getSignupValue().equals(value)) { return experienceYear; } } From ef5e7eed92014150b70d3e5d6fa3ee2d66d49a02 Mon Sep 17 00:00:00 2001 From: wuseong Date: Sun, 18 Feb 2024 16:42:29 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=EC=82=AC=EC=9A=A9=EC=9E=90=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=A1=B0=ED=9A=8C/=EC=88=98=EC=A0=95?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=97=B0=EC=B0=A8=20=EC=9D=91=EB=8B=B5=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=20=EB=B3=80=EA=B2=BD,=20=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=EC=97=90=20job=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onnoff/onnoff/domain/user/converter/UserConverter.java | 7 ++++--- .../com/onnoff/onnoff/domain/user/dto/UserResponseDTO.java | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/onnoff/onnoff/domain/user/converter/UserConverter.java b/src/main/java/com/onnoff/onnoff/domain/user/converter/UserConverter.java index d08d49f..fb19c71 100644 --- a/src/main/java/com/onnoff/onnoff/domain/user/converter/UserConverter.java +++ b/src/main/java/com/onnoff/onnoff/domain/user/converter/UserConverter.java @@ -70,14 +70,15 @@ public static UserResponseDTO.UserDetailDTO toUserDetailDTO(User user){ public static UserResponseDTO.UserInformationResponseDTO toUserInformationResponseDTO(User user){ return UserResponseDTO.UserInformationResponseDTO.builder() .nickname(user.getNickname()) - .experienceYear(user.getExperienceYear()) - .fieldOfWork(user.getFieldOfWork()) + .experienceYear(user.getExperienceYear().getMypageValue()) + .fieldOfWork(user.getFieldOfWork().getValue()) + .job(user.getJob()) .build(); } public static UserResponseDTO.UserModificationResponseDTO toUserModificationResponseDTO(User user){ return UserResponseDTO.UserModificationResponseDTO.builder() .nickname(user.getNickname()) - .experienceYear(user.getExperienceYear().getValue()) + .experienceYear(user.getExperienceYear().getMypageValue()) .fieldOfWork(user.getFieldOfWork().getValue()) .job(user.getJob()) .build(); diff --git a/src/main/java/com/onnoff/onnoff/domain/user/dto/UserResponseDTO.java b/src/main/java/com/onnoff/onnoff/domain/user/dto/UserResponseDTO.java index 603de89..9e283de 100644 --- a/src/main/java/com/onnoff/onnoff/domain/user/dto/UserResponseDTO.java +++ b/src/main/java/com/onnoff/onnoff/domain/user/dto/UserResponseDTO.java @@ -49,8 +49,9 @@ public static class UserDetailDTO{ @AllArgsConstructor public static class UserInformationResponseDTO { private String nickname; - private FieldOfWork fieldOfWork; - private ExperienceYear experienceYear; + private String fieldOfWork; + private String experienceYear; + private String job; } @Builder @Getter From 2285eee83b1a66f4baf5524dfec348a8b684abdd Mon Sep 17 00:00:00 2001 From: wuseong Date: Sun, 18 Feb 2024 16:43:50 +0900 Subject: [PATCH 3/3] =?UTF-8?q?rename:=20=EC=97=B0=EC=B0=A8=20enum?= =?UTF-8?q?=EA=B0=92=20=EC=A1=B0=ED=9A=8C=20=EC=9D=91=EB=8B=B5=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=88=98=EC=A0=95=EB=90=9C=20=ED=95=84=EB=93=9C?= =?UTF-8?q?=EB=AA=85=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onnoff/onnoff/domain/user/dto/EnumInquiryResponseDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/onnoff/onnoff/domain/user/dto/EnumInquiryResponseDTO.java b/src/main/java/com/onnoff/onnoff/domain/user/dto/EnumInquiryResponseDTO.java index 362cd11..170ef07 100644 --- a/src/main/java/com/onnoff/onnoff/domain/user/dto/EnumInquiryResponseDTO.java +++ b/src/main/java/com/onnoff/onnoff/domain/user/dto/EnumInquiryResponseDTO.java @@ -19,7 +19,7 @@ public static List getAllField() { public static class ExperienceYearResponseDTO{ public static List getAllExperience() { return Arrays.stream(ExperienceYear.values()) - .map(ExperienceYear::getValue) + .map(ExperienceYear::getSignupValue) .collect(Collectors.toList()); } }