Skip to content

Commit

Permalink
[FEAT] 유저 잔디력 조회 서비스 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
tidavid1 committed Feb 26, 2024
1 parent 052d038 commit 3de50a7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<WantedJob> wantedJobs) {
Set<WantedJob> wantedJobSet = new HashSet<>(wantedJobs);
if (wantedJobSet.size() != wantedJobs.size()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit 3de50a7

Please sign in to comment.