From 0de464178849444aeea1fafebb020274ae3d30e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=AA=85=EB=8D=95?= <68066437+Profile-exe@users.noreply.github.com> Date: Tue, 26 Nov 2024 22:02:45 +0900 Subject: [PATCH] =?UTF-8?q?[REFACTOR]=20=ED=9A=8C=EC=9B=90=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EC=88=98=EC=A0=95=20=EB=B2=94=EC=9C=84=EB=A5=BC=20?= =?UTF-8?q?=EB=8B=89=EB=84=A4=EC=9E=84=EA=B3=BC=20=EC=9E=A5=EC=95=A0?= =?UTF-8?q?=EC=9C=A0=ED=98=95=EC=9C=BC=EB=A1=9C=20=EC=A0=9C=ED=95=9C=20(#2?= =?UTF-8?q?11)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: 회원정보 수정 요청 본문이 닉네임과 장애유형만 갖도록 수정 * refactor: 회원정보 수정 메서드가 닉네임과 장애유형만 수정하도록 변경 --- .../java/econo/buddybridge/member/dto/MemberReqDto.java | 6 ------ src/main/java/econo/buddybridge/member/entity/Member.java | 8 +------- .../econo/buddybridge/member/service/MemberService.java | 3 +-- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/main/java/econo/buddybridge/member/dto/MemberReqDto.java b/src/main/java/econo/buddybridge/member/dto/MemberReqDto.java index 773ef66..f69537b 100644 --- a/src/main/java/econo/buddybridge/member/dto/MemberReqDto.java +++ b/src/main/java/econo/buddybridge/member/dto/MemberReqDto.java @@ -1,15 +1,9 @@ package econo.buddybridge.member.dto; import econo.buddybridge.member.entity.DisabilityType; -import econo.buddybridge.member.entity.Gender; public record MemberReqDto( - String name, String nickname, - String profileImageUrl, - String email, - Integer age, - Gender gender, DisabilityType disabilityType ) { diff --git a/src/main/java/econo/buddybridge/member/entity/Member.java b/src/main/java/econo/buddybridge/member/entity/Member.java index fc0f0a7..c9a51f5 100644 --- a/src/main/java/econo/buddybridge/member/entity/Member.java +++ b/src/main/java/econo/buddybridge/member/entity/Member.java @@ -68,14 +68,8 @@ public void updateKakaoToken(String kakaoToken) { this.kakaoToken = kakaoToken; } - public void updateMemberInfo(String name, String nickname, String profileImageUrl, String email, Integer age, - DisabilityType disabilityType, Gender gender) { - this.name = name; + public void updateMemberInfo(String nickname, DisabilityType disabilityType) { this.nickname = nickname; - this.profileImageUrl = profileImageUrl; - this.email = email; - this.age = age; this.disabilityType = disabilityType; - this.gender = gender; } } diff --git a/src/main/java/econo/buddybridge/member/service/MemberService.java b/src/main/java/econo/buddybridge/member/service/MemberService.java index 42a8f99..9f5d40f 100644 --- a/src/main/java/econo/buddybridge/member/service/MemberService.java +++ b/src/main/java/econo/buddybridge/member/service/MemberService.java @@ -64,8 +64,7 @@ private Member newMember(UserInfoWithKakaoToken userInfo) { public void updateMemberById(Long memberId, MemberReqDto memberReqDto) { Member member = findMemberByIdOrThrow(memberId); - member.updateMemberInfo(memberReqDto.name(), memberReqDto.nickname(), memberReqDto.profileImageUrl(), - memberReqDto.email(), memberReqDto.age(), memberReqDto.disabilityType(), member.getGender()); + member.updateMemberInfo(memberReqDto.nickname(), memberReqDto.disabilityType()); } @Transactional