From a3568441ef53887b84e7038b6372920e29d2a99f Mon Sep 17 00:00:00 2001 From: yang Date: Sat, 11 Nov 2023 19:17:32 +0900 Subject: [PATCH] =?UTF-8?q?RAC-146=20refactor=20:=20=EC=84=A0=EB=B0=B0=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=EC=A0=95=EB=B3=B4=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/dto/req/SeniorProfileAndAccountRequest.java | 2 -- .../domain/senior/application/mapper/SeniorMapper.java | 1 - .../postgraduate/domain/senior/domain/entity/Account.java | 5 +++++ .../com/postgraduate/domain/senior/domain/entity/Senior.java | 2 +- .../senior/presentation/constant/SeniorResponseMessage.java | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/postgraduate/domain/senior/application/dto/req/SeniorProfileAndAccountRequest.java b/src/main/java/com/postgraduate/domain/senior/application/dto/req/SeniorProfileAndAccountRequest.java index e79d8b5a..2aeb7c19 100644 --- a/src/main/java/com/postgraduate/domain/senior/application/dto/req/SeniorProfileAndAccountRequest.java +++ b/src/main/java/com/postgraduate/domain/senior/application/dto/req/SeniorProfileAndAccountRequest.java @@ -25,6 +25,4 @@ public class SeniorProfileAndAccountRequest { private String account; @NotNull private String bank; - @NotNull - private String rrn; } diff --git a/src/main/java/com/postgraduate/domain/senior/application/mapper/SeniorMapper.java b/src/main/java/com/postgraduate/domain/senior/application/mapper/SeniorMapper.java index bd5c670f..6affd8bc 100644 --- a/src/main/java/com/postgraduate/domain/senior/application/mapper/SeniorMapper.java +++ b/src/main/java/com/postgraduate/domain/senior/application/mapper/SeniorMapper.java @@ -46,7 +46,6 @@ public static Account mapToAccount(SeniorProfileAndAccountRequest profileAndAcco return Account.builder() .bank(profileAndAccountPageRequest.getBank()) .account(profileAndAccountPageRequest.getAccount()) - .rrn(profileAndAccountPageRequest.getRrn()) .build(); } diff --git a/src/main/java/com/postgraduate/domain/senior/domain/entity/Account.java b/src/main/java/com/postgraduate/domain/senior/domain/entity/Account.java index 80e1ef48..9ae638f1 100644 --- a/src/main/java/com/postgraduate/domain/senior/domain/entity/Account.java +++ b/src/main/java/com/postgraduate/domain/senior/domain/entity/Account.java @@ -21,4 +21,9 @@ public class Account { @Column(nullable = false) private String rrn; + + public void updateAccount(Account account) { + this.account = account.getAccount(); + this.bank = account.getBank(); + } } diff --git a/src/main/java/com/postgraduate/domain/senior/domain/entity/Senior.java b/src/main/java/com/postgraduate/domain/senior/domain/entity/Senior.java index 35bf55b6..c1ae9e96 100644 --- a/src/main/java/com/postgraduate/domain/senior/domain/entity/Senior.java +++ b/src/main/java/com/postgraduate/domain/senior/domain/entity/Senior.java @@ -51,7 +51,7 @@ public void updateProfile(Profile profile) { public void updateProfileAndAccount(Profile profile, Account account) { this.profile = profile; - this.account = account; + account.updateAccount(account); } public void updateCertification(String certification) { diff --git a/src/main/java/com/postgraduate/domain/senior/presentation/constant/SeniorResponseMessage.java b/src/main/java/com/postgraduate/domain/senior/presentation/constant/SeniorResponseMessage.java index 654f4108..60322dfe 100644 --- a/src/main/java/com/postgraduate/domain/senior/presentation/constant/SeniorResponseMessage.java +++ b/src/main/java/com/postgraduate/domain/senior/presentation/constant/SeniorResponseMessage.java @@ -7,7 +7,7 @@ @RequiredArgsConstructor public enum SeniorResponseMessage { CREATE_SENIOR("대학원생 가입에 성공하였습니다."), - UPDATE_PROFILE("대학원생 프로필 등록에 성공하였습니다"), + UPDATE_PROFILE("대학원생 프로필 수정에 성공하였습니다"), GET_SENIOR_INFO("대학원생 정보 조회에 성공하였습니다"), GET_SENIOR_PROFILE("대학원생 프로필 조회에 성공하였습니다"), UPDATE_CERTIFICATION("대학원생 인증사진 업로드에 성공하였습니다"),