From 3de50a7be5ae200cd3e39a992375296d484f9290 Mon Sep 17 00:00:00 2001 From: KyungMin Lee Date: Mon, 26 Feb 2024 21:08:01 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT]=20=EC=9C=A0=EC=A0=80=20=EC=9E=94?= =?UTF-8?q?=EB=94=94=EB=A0=A5=20=EC=A1=B0=ED=9A=8C=20=EC=84=9C=EB=B9=84?= =?UTF-8?q?=EC=8A=A4=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/user/application/UserService.java | 6 ++++++ .../application/dto/res/UserJandiRateRes.java | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/main/java/io/oeid/mogakgo/domain/user/application/dto/res/UserJandiRateRes.java diff --git a/src/main/java/io/oeid/mogakgo/domain/user/application/UserService.java b/src/main/java/io/oeid/mogakgo/domain/user/application/UserService.java index c53bc647..50de62dc 100644 --- a/src/main/java/io/oeid/mogakgo/domain/user/application/UserService.java +++ b/src/main/java/io/oeid/mogakgo/domain/user/application/UserService.java @@ -7,6 +7,7 @@ import io.oeid.mogakgo.domain.user.application.dto.req.UserSignUpRequest; import io.oeid.mogakgo.domain.user.application.dto.req.UserUpdateReq; import io.oeid.mogakgo.domain.user.application.dto.res.UserDevelopLanguageRes; +import io.oeid.mogakgo.domain.user.application.dto.res.UserJandiRateRes; import io.oeid.mogakgo.domain.user.application.dto.res.UserProfileResponse; import io.oeid.mogakgo.domain.user.application.dto.res.UserSignUpResponse; import io.oeid.mogakgo.domain.user.application.dto.res.UserUpdateRes; @@ -105,6 +106,11 @@ public void deleteUser(Long userId) { user.delete(); } + public UserJandiRateRes getUserJandiRate(Long userId) { + User user = userCommonService.getUserById(userId); + return UserJandiRateRes.of(user.getId(), user.getJandiRate()); + } + private void validateWantedJobDuplicate(List wantedJobs) { Set wantedJobSet = new HashSet<>(wantedJobs); if (wantedJobSet.size() != wantedJobs.size()) { diff --git a/src/main/java/io/oeid/mogakgo/domain/user/application/dto/res/UserJandiRateRes.java b/src/main/java/io/oeid/mogakgo/domain/user/application/dto/res/UserJandiRateRes.java new file mode 100644 index 00000000..0e70bd92 --- /dev/null +++ b/src/main/java/io/oeid/mogakgo/domain/user/application/dto/res/UserJandiRateRes.java @@ -0,0 +1,17 @@ +package io.oeid.mogakgo.domain.user.application.dto.res; + +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class UserJandiRateRes { + + private Long userId; + private Double jandiRate; + + public static UserJandiRateRes of(Long userId, Double jandiRate) { + return new UserJandiRateRes(userId, jandiRate); + } +}