From 463441b8732b859311a131a01222db7d9ec0c2ea Mon Sep 17 00:00:00 2001 From: yang Date: Thu, 24 Oct 2024 03:33:42 +0900 Subject: [PATCH] =?UTF-8?q?RAC-452=20fix=20:=20=ED=9B=84=EB=B0=B0=20?= =?UTF-8?q?=EA=B0=80=EC=9E=85(=EC=B6=94=EA=B0=80=20=EA=B0=80=EC=9E=85)?= =?UTF-8?q?=EC=8B=9C=20user=EC=83=9D=EC=84=B1=20=ED=9B=84=20wish=20?= =?UTF-8?q?=EC=84=B8=ED=8C=85=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/member/user/domain/service/UserSaveService.java | 4 +++- .../auth/login/application/usecase/oauth/SignUpUseCase.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/postgraduate/domain/member/user/domain/service/UserSaveService.java b/src/main/java/com/postgraduate/domain/member/user/domain/service/UserSaveService.java index 27ac4d8e..fa87299a 100644 --- a/src/main/java/com/postgraduate/domain/member/user/domain/service/UserSaveService.java +++ b/src/main/java/com/postgraduate/domain/member/user/domain/service/UserSaveService.java @@ -16,10 +16,12 @@ public void saveSenior(User user) { } public void saveJunior(User user, Wish wish) { + user.addWish(wish); userRepository.saveJunior(user, wish); } - public void changeJunior(Wish wish) { + public void changeJunior(User user, Wish wish) { + user.addWish(wish); userRepository.changeJunior(wish); } } diff --git a/src/main/java/com/postgraduate/global/auth/login/application/usecase/oauth/SignUpUseCase.java b/src/main/java/com/postgraduate/global/auth/login/application/usecase/oauth/SignUpUseCase.java index 66afb53c..c126f8bb 100644 --- a/src/main/java/com/postgraduate/global/auth/login/application/usecase/oauth/SignUpUseCase.java +++ b/src/main/java/com/postgraduate/global/auth/login/application/usecase/oauth/SignUpUseCase.java @@ -52,7 +52,7 @@ public User userSignUp(SignUpRequest request) { userUtils.checkPhoneNumber(request.phoneNumber()); User user = UserMapper.mapToUser(request, profileUtils.juniorProfile(rd.nextInt(5))); Wish wish = UserMapper.mapToWish(user, request); - userSaveService.saveJunior(user,wish); + userSaveService.saveJunior(user, wish); if (request.matchingReceive()) bizppurioJuniorMessage.matchingWaiting(user); slackSignUpMessage.sendJuniorSignUp(user, wish); @@ -76,7 +76,7 @@ public User changeSenior(User user, SeniorChangeRequest changeRequest) { public void changeUser(User user, UserChangeRequest changeRequest) { Wish wish = UserMapper.mapToWish(user, changeRequest); - userSaveService.changeJunior(wish); + userSaveService.changeJunior(user, wish); if (changeRequest.matchingReceive()) bizppurioJuniorMessage.matchingWaiting(user); slackSignUpMessage.sendJuniorSignUp(user, wish);