From ee774fd54425cd0e82c9989ac34d92b78484e090 Mon Sep 17 00:00:00 2001 From: kmw2378 Date: Sun, 26 May 2024 19:24:55 +0900 Subject: [PATCH 01/10] =?UTF-8?q?[feat]Member=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=EC=97=90=20profileImageUrl=20=ED=95=84=EB=93=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20(#${closes})?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/member/entity/Member.java | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/kakaoshare/backend/domain/member/entity/Member.java b/src/main/java/org/kakaoshare/backend/domain/member/entity/Member.java index bad472f26..f47b9e8ed 100644 --- a/src/main/java/org/kakaoshare/backend/domain/member/entity/Member.java +++ b/src/main/java/org/kakaoshare/backend/domain/member/entity/Member.java @@ -23,46 +23,50 @@ @Entity @Getter public class Member extends BaseTimeEntity { - + @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long memberId; - + @Column(nullable = false, columnDefinition = "varchar(255)") @Enumerated(EnumType.STRING) private Gender gender; - + @Column(nullable = false) private String name; - + @Column(nullable = false, length = 20) private String phoneNumber; - + @Column(nullable = false) private String providerId; - + + @Column(nullable = false) + private String profileImageUrl; + @Builder.Default @Column(nullable = false, columnDefinition = "varchar(255)") @Enumerated(EnumType.STRING) private Role role = USER; - + @Builder.Default @OneToMany(mappedBy = "member",fetch = FetchType.LAZY) private List wishes=new ArrayList<>(); - + protected Member() { - + } - + @Builder - public Member(final Long memberId, final Gender gender, final String name, final String phoneNumber, final String providerId) { + public Member(final Long memberId, final Gender gender, final String name, final String phoneNumber, final String providerId, final String profileImageUrl) { this.memberId = memberId; this.gender = gender; this.name = name; this.phoneNumber = phoneNumber; this.providerId = providerId; + this.profileImageUrl = profileImageUrl; } - + @Override public String toString() { return "Member{" + @@ -71,10 +75,11 @@ public String toString() { ", username='" + name + '\'' + ", phoneNumber='" + phoneNumber + '\'' + ", providerId='" + providerId + '\'' + + ", profileImageUrl='" + profileImageUrl + '\'' + ", role=" + role + '}'; } - + public boolean isWishEmpty() { return wishes == null || wishes.isEmpty(); } From c0571092151e6c2495d74f94f19a90a23f30475f Mon Sep 17 00:00:00 2001 From: kmw2378 Date: Sun, 26 May 2024 19:25:04 +0900 Subject: [PATCH 02/10] =?UTF-8?q?[test]MemberFixture=20=EC=97=90=20profile?= =?UTF-8?q?ImageUrl=20=EB=B0=98=EC=98=81=20(#${closes})?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/org/kakaoshare/backend/fixture/MemberFixture.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/org/kakaoshare/backend/fixture/MemberFixture.java b/src/test/java/org/kakaoshare/backend/fixture/MemberFixture.java index 231ba3250..1a5b26035 100644 --- a/src/test/java/org/kakaoshare/backend/fixture/MemberFixture.java +++ b/src/test/java/org/kakaoshare/backend/fixture/MemberFixture.java @@ -32,6 +32,7 @@ public enum MemberFixture { .gender(gender) .phoneNumber(phoneNumber) .providerId(providerId) + .profileImageUrl("defaultProfileImageUrl") .build(); } } From 14e5590b46791c9bd3af4468f3183eae6b2dd532 Mon Sep 17 00:00:00 2001 From: kmw2378 Date: Sun, 26 May 2024 19:26:12 +0900 Subject: [PATCH 03/10] =?UTF-8?q?[feat]V5=5F=5Fadd=5Fmember=5Fprofile=5Fur?= =?UTF-8?q?l.sql=20=EC=B6=94=EA=B0=80=20(#${closes})?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/db/migration/V5__add_member_profile_url.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/main/resources/db/migration/V5__add_member_profile_url.sql diff --git a/src/main/resources/db/migration/V5__add_member_profile_url.sql b/src/main/resources/db/migration/V5__add_member_profile_url.sql new file mode 100644 index 000000000..13dbbad69 --- /dev/null +++ b/src/main/resources/db/migration/V5__add_member_profile_url.sql @@ -0,0 +1,2 @@ +ALTER TABLE member +ADD COLUMN `profile_image_url` VARCHAR(255) NOT NULL; \ No newline at end of file From 5baf93ee4f5769835dcb846507e6fad5003545f6 Mon Sep 17 00:00:00 2001 From: kmw2378 Date: Sun, 26 May 2024 19:27:43 +0900 Subject: [PATCH 04/10] =?UTF-8?q?[feat]OAuthProfile.toEntity()=20=EB=A9=94?= =?UTF-8?q?=EC=84=9C=EB=93=9C=EC=97=90=20profileImageUrl=20=ED=95=84?= =?UTF-8?q?=EB=93=9C=20=EB=B0=98=EC=98=81=20(#${closes})?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/member/dto/oauth/profile/OAuthProfile.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/kakaoshare/backend/domain/member/dto/oauth/profile/OAuthProfile.java b/src/main/java/org/kakaoshare/backend/domain/member/dto/oauth/profile/OAuthProfile.java index 720e2480f..12d8a7aa1 100644 --- a/src/main/java/org/kakaoshare/backend/domain/member/dto/oauth/profile/OAuthProfile.java +++ b/src/main/java/org/kakaoshare/backend/domain/member/dto/oauth/profile/OAuthProfile.java @@ -28,6 +28,7 @@ public Member toEntity() { .gender(Gender.from(getGender())) .phoneNumber(getPhoneNumber()) .providerId(getProviderId()) + .profileImageUrl(getProfileImageUrl()) .build(); } } From 330fef2ad94035c07f1129be56a47167f6baa7bc Mon Sep 17 00:00:00 2001 From: kmw2378 Date: Sun, 26 May 2024 19:28:29 +0900 Subject: [PATCH 05/10] =?UTF-8?q?[refactor]Receiver=20=ED=81=B4=EB=9E=98?= =?UTF-8?q?=EC=8A=A4=EB=AA=85=EC=9D=84=20PaymentSuccessReceiver=EB=A1=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=ED=94=84=EB=A1=9C=ED=95=84?= =?UTF-8?q?=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EA=B0=80=EC=A0=B8=EC=98=A4?= =?UTF-8?q?=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80=20(#${close?= =?UTF-8?q?s})?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../response/PaymentFundingSuccessResponse.java | 2 +- .../success/response/PaymentGiftSuccessResponse.java | 2 +- .../dto/success/response/PaymentSuccessReceiver.java | 9 +++++++++ .../payment/dto/success/response/Receiver.java | 9 --------- .../domain/payment/service/PaymentService.java | 8 ++++---- .../domain/payment/service/PaymentServiceTest.java | 12 ++++++------ 6 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentSuccessReceiver.java delete mode 100644 src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/Receiver.java diff --git a/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentFundingSuccessResponse.java b/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentFundingSuccessResponse.java index b8723829d..7b65aef19 100644 --- a/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentFundingSuccessResponse.java +++ b/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentFundingSuccessResponse.java @@ -2,5 +2,5 @@ import org.kakaoshare.backend.domain.product.dto.ProductSummaryResponse; -public record PaymentFundingSuccessResponse(Receiver receiver, ProductSummaryResponse product, Long attributeAmount) { +public record PaymentFundingSuccessResponse(PaymentSuccessReceiver receiver, ProductSummaryResponse product, Long attributeAmount) { } diff --git a/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentGiftSuccessResponse.java b/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentGiftSuccessResponse.java index 50d5d3aa6..23bd63263 100644 --- a/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentGiftSuccessResponse.java +++ b/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentGiftSuccessResponse.java @@ -4,5 +4,5 @@ import java.util.List; -public record PaymentGiftSuccessResponse(Receiver receiver, List orders) { +public record PaymentGiftSuccessResponse(PaymentSuccessReceiver receiver, List orders) { } diff --git a/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentSuccessReceiver.java b/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentSuccessReceiver.java new file mode 100644 index 000000000..d9db260ca --- /dev/null +++ b/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/PaymentSuccessReceiver.java @@ -0,0 +1,9 @@ +package org.kakaoshare.backend.domain.payment.dto.success.response; + +import org.kakaoshare.backend.domain.member.entity.Member; + +public record PaymentSuccessReceiver(String name, String photoUrl) { + public static PaymentSuccessReceiver from(final Member member) { + return new PaymentSuccessReceiver(member.getName(), member.getProfileImageUrl()); + } +} diff --git a/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/Receiver.java b/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/Receiver.java deleted file mode 100644 index f247c75ea..000000000 --- a/src/main/java/org/kakaoshare/backend/domain/payment/dto/success/response/Receiver.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.kakaoshare.backend.domain.payment.dto.success.response; - -import org.kakaoshare.backend.domain.member.entity.Member; - -public record Receiver(String name, String photoUrl) { - public static Receiver from(final Member member) { - return new Receiver(member.getName(), null); // TODO: 3/28/24 프로필 사진 URL이 없어 null로 대체 - } -} diff --git a/src/main/java/org/kakaoshare/backend/domain/payment/service/PaymentService.java b/src/main/java/org/kakaoshare/backend/domain/payment/service/PaymentService.java index bf1de589d..4fc660d6e 100644 --- a/src/main/java/org/kakaoshare/backend/domain/payment/service/PaymentService.java +++ b/src/main/java/org/kakaoshare/backend/domain/payment/service/PaymentService.java @@ -46,7 +46,7 @@ import org.kakaoshare.backend.domain.payment.dto.success.request.PaymentSuccessRequest; import org.kakaoshare.backend.domain.payment.dto.success.response.PaymentFundingSuccessResponse; import org.kakaoshare.backend.domain.payment.dto.success.response.PaymentGiftSuccessResponse; -import org.kakaoshare.backend.domain.payment.dto.success.response.Receiver; +import org.kakaoshare.backend.domain.payment.dto.success.response.PaymentSuccessReceiver; import org.kakaoshare.backend.domain.payment.entity.Payment; import org.kakaoshare.backend.domain.payment.entity.PaymentMethod; import org.kakaoshare.backend.domain.payment.exception.PaymentErrorCode; @@ -152,7 +152,7 @@ public PaymentGiftSuccessResponse approve(final String providerId, saveOrders(payment, receipts); final List orderSummaries = getOrderSummaries(orderDetails); - return new PaymentGiftSuccessResponse(Receiver.from(receiver), orderSummaries); + return new PaymentGiftSuccessResponse(PaymentSuccessReceiver.from(receiver), orderSummaries); } @Transactional @@ -178,8 +178,8 @@ public PaymentFundingSuccessResponse approveFunding(final String providerId, final Product product = funding.getProduct(); final ProductSummaryResponse productSummaryResponse = ProductSummaryResponse.from(product); - final Receiver receiver = Receiver.from(funding.getMember()); - return new PaymentFundingSuccessResponse(receiver, productSummaryResponse, amount); + final PaymentSuccessReceiver paymentSuccessReceiver = PaymentSuccessReceiver.from(funding.getMember()); + return new PaymentFundingSuccessResponse(paymentSuccessReceiver, productSummaryResponse, amount); } @Transactional diff --git a/src/test/java/org/kakaoshare/backend/domain/payment/service/PaymentServiceTest.java b/src/test/java/org/kakaoshare/backend/domain/payment/service/PaymentServiceTest.java index abb9f9cd0..9818c7981 100644 --- a/src/test/java/org/kakaoshare/backend/domain/payment/service/PaymentServiceTest.java +++ b/src/test/java/org/kakaoshare/backend/domain/payment/service/PaymentServiceTest.java @@ -36,7 +36,7 @@ import org.kakaoshare.backend.domain.payment.dto.success.request.PaymentSuccessRequest; import org.kakaoshare.backend.domain.payment.dto.success.response.PaymentFundingSuccessResponse; import org.kakaoshare.backend.domain.payment.dto.success.response.PaymentGiftSuccessResponse; -import org.kakaoshare.backend.domain.payment.dto.success.response.Receiver; +import org.kakaoshare.backend.domain.payment.dto.success.response.PaymentSuccessReceiver; import org.kakaoshare.backend.domain.payment.entity.Payment; import org.kakaoshare.backend.domain.payment.entity.PaymentMethod; import org.kakaoshare.backend.domain.payment.repository.PaymentRepository; @@ -217,8 +217,8 @@ public void approveToMe() throws Exception { new OrderSummaryResponse(cakeSummaryResponse, cakeStockQuantity, Collections.emptyList()), new OrderSummaryResponse(coffeeSummaryResponse, coffeeStockQuantity, Collections.emptyList()) ); - final Receiver receiver = Receiver.from(member); - final PaymentGiftSuccessResponse expect = new PaymentGiftSuccessResponse(receiver, orderSummaries); + final PaymentSuccessReceiver paymentSuccessReceiver = PaymentSuccessReceiver.from(member); + final PaymentGiftSuccessResponse expect = new PaymentGiftSuccessResponse(paymentSuccessReceiver, orderSummaries); final PaymentGiftSuccessResponse actual = paymentService.approve(providerId, paymentSuccessRequest); assertThat(actual).isEqualTo(expect); // TODO: 3/16/24 equals() 및 hashCode()가 재정의되있으므로 isEqualTo() 사용 } @@ -279,8 +279,8 @@ public void approveToOther() throws Exception { new OrderSummaryResponse(cakeSummaryResponse, cakeStockQuantity, Collections.emptyList()), new OrderSummaryResponse(coffeeSummaryResponse, coffeeStockQuantity, Collections.emptyList()) ); - final Receiver receiver = Receiver.from(receiverMember); - final PaymentGiftSuccessResponse expect = new PaymentGiftSuccessResponse(receiver, orderSummaries); + final PaymentSuccessReceiver paymentSuccessReceiver = PaymentSuccessReceiver.from(receiverMember); + final PaymentGiftSuccessResponse expect = new PaymentGiftSuccessResponse(paymentSuccessReceiver, orderSummaries); final PaymentGiftSuccessResponse actual = paymentService.approve(providerId, paymentSuccessRequest); assertThat(actual).isEqualTo(expect); // TODO: 3/16/24 equals() 및 hashCode()가 재정의되있으므로 isEqualTo() 사용 } @@ -365,7 +365,7 @@ public void approveFunding() throws Exception { doReturn(Optional.of(contributor)).when(memberRepository).findMemberByProviderId(providerId); final ProductSummaryResponse productSummaryResponse = ProductSummaryResponse.from(cake); - final PaymentFundingSuccessResponse expect = new PaymentFundingSuccessResponse(Receiver.from(creator), productSummaryResponse, (long) attributeAmount); + final PaymentFundingSuccessResponse expect = new PaymentFundingSuccessResponse(PaymentSuccessReceiver.from(creator), productSummaryResponse, (long) attributeAmount); final PaymentFundingSuccessResponse actual = paymentService.approveFunding(providerId, paymentSuccessRequest); assertThat(actual).isEqualTo(expect); From 5f29fbaa834adf87cb4db47c40cf018c7b162412 Mon Sep 17 00:00:00 2001 From: kmw2378 Date: Mon, 27 May 2024 13:46:05 +0900 Subject: [PATCH 06/10] =?UTF-8?q?[refactor]Flyway=20SQL=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EB=B2=84=EC=A0=84=EC=9D=84=20V5=EC=97=90=EC=84=9C?= =?UTF-8?q?=20V7=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20(#234)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._add_member_profile_url.sql => V7__add_member_profile_url.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/db/migration/{V5__add_member_profile_url.sql => V7__add_member_profile_url.sql} (100%) diff --git a/src/main/resources/db/migration/V5__add_member_profile_url.sql b/src/main/resources/db/migration/V7__add_member_profile_url.sql similarity index 100% rename from src/main/resources/db/migration/V5__add_member_profile_url.sql rename to src/main/resources/db/migration/V7__add_member_profile_url.sql From 1281e47fe3c411c32f565f9bf0253db5ce38b9c6 Mon Sep 17 00:00:00 2001 From: kmw2378 Date: Mon, 27 May 2024 21:30:59 +0900 Subject: [PATCH 07/10] =?UTF-8?q?[refactor]=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=8B=9C=20=EB=8D=94=ED=8B=B0=20=EC=B2=B4=ED=82=B9=EC=9D=84=20?= =?UTF-8?q?=ED=86=B5=ED=95=B4=20=ED=94=84=EB=A1=9C=ED=95=84=20=EC=82=AC?= =?UTF-8?q?=EC=A7=84=20=EC=88=98=EC=A0=95=ED=95=98=EB=8A=94=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80=20(#227)=20memberRepository.save?= =?UTF-8?q?()=EB=A5=BC=20=ED=86=B5=ED=95=B4=20=EC=8B=A0=EA=B7=9C=20?= =?UTF-8?q?=ED=9A=8C=EC=9B=90=EC=9D=84=20=EC=A0=80=EC=9E=A5=ED=95=98?= =?UTF-8?q?=EA=B1=B0=EB=82=98=20=EA=B8=B0=EC=A1=B4=20=ED=9A=8C=EC=9B=90=20?= =?UTF-8?q?=EB=8D=94=ED=8B=B0=20=EC=B2=B4=ED=82=B9=20=ED=9B=84=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=95=84=20=EC=82=AC=EC=A7=84=20=EB=93=B1=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=EC=A0=90=EC=9D=84=20=EC=88=98=EC=A0=95=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/member/service/oauth/OAuthService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/kakaoshare/backend/domain/member/service/oauth/OAuthService.java b/src/main/java/org/kakaoshare/backend/domain/member/service/oauth/OAuthService.java index 4538810b8..f3e9a0cdc 100644 --- a/src/main/java/org/kakaoshare/backend/domain/member/service/oauth/OAuthService.java +++ b/src/main/java/org/kakaoshare/backend/domain/member/service/oauth/OAuthService.java @@ -8,6 +8,7 @@ import org.kakaoshare.backend.domain.member.dto.oauth.logout.OAuthLogoutRequest; import org.kakaoshare.backend.domain.member.dto.oauth.profile.OAuthProfile; import org.kakaoshare.backend.domain.member.dto.oauth.profile.OAuthProfileFactory; +import org.kakaoshare.backend.domain.member.entity.Member; import org.kakaoshare.backend.domain.member.entity.MemberDetails; import org.kakaoshare.backend.domain.member.entity.token.RefreshToken; import org.kakaoshare.backend.domain.member.exception.MemberErrorCode; @@ -76,8 +77,8 @@ private OAuthProfile getProfile(final OAuthLoginRequest request, final ClientReg } private UserDetails addOrFindByProfile(final OAuthProfile oAuthProfile) { - return memberRepository.findDetailsByProviderId(oAuthProfile.getProviderId()) - .orElseGet(() -> MemberDetails.from(memberRepository.save(oAuthProfile.toEntity()))); + final Member member = memberRepository.save(oAuthProfile.toEntity()); // TODO: 5/27/24 dirty checking 을 통해 DB내 Member 테이블 프로필 사진 수정 + return MemberDetails.from(member); } private UserDetails findUserDetailsByProviderId(final String providerId) { From d0011c46a2ee6534e4358b21df10303966d8cd58 Mon Sep 17 00:00:00 2001 From: kmw2378 Date: Tue, 28 May 2024 14:05:37 +0900 Subject: [PATCH 08/10] =?UTF-8?q?[test]OAuthServiceTest=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=8B=A4=ED=8C=A8=20=ED=95=B4=EA=B2=B0=20?= =?UTF-8?q?(#234)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/member/service/OAuthServiceTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/org/kakaoshare/backend/domain/member/service/OAuthServiceTest.java b/src/test/java/org/kakaoshare/backend/domain/member/service/OAuthServiceTest.java index 5f28a5fb6..f90fdc035 100644 --- a/src/test/java/org/kakaoshare/backend/domain/member/service/OAuthServiceTest.java +++ b/src/test/java/org/kakaoshare/backend/domain/member/service/OAuthServiceTest.java @@ -88,7 +88,6 @@ public void authenticateWhenNewMember() throws Exception { doReturn(registration).when(clientRegistrationRepository).findByRegistrationId(registrationId); doReturn(attributes).when(webClientService).getSocialProfile(registration, socialAccessToken); - doReturn(Optional.empty()).when(memberRepository).findDetailsByProviderId(providerId); doReturn(member).when(memberRepository).save(any()); doReturn(accessToken).when(jwtProvider).createAccessToken(userDetails); doReturn(refreshToken).when(refreshTokenProvider).createToken(userDetails.getUsername()); @@ -110,7 +109,7 @@ public void authenticateWhenExistingMember() throws Exception { doReturn(registration).when(clientRegistrationRepository).findByRegistrationId(registrationId); doReturn(attributes).when(webClientService).getSocialProfile(registration, socialAccessToken); - doReturn(Optional.of(userDetails)).when(memberRepository).findDetailsByProviderId(providerId); + doReturn(member).when(memberRepository).save(any()); doReturn(accessToken).when(jwtProvider).createAccessToken(userDetails); doReturn(refreshToken).when(refreshTokenProvider).createToken(userDetails.getUsername()); doReturn(refreshToken).when(refreshTokenRepository).save(any()); From fb693c6ee0d5851ec6435d5548d2f92428bfc272 Mon Sep 17 00:00:00 2001 From: kmw2378 Date: Tue, 28 May 2024 14:11:39 +0900 Subject: [PATCH 09/10] =?UTF-8?q?[refactor]Member=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=EC=9E=90=20=EC=88=98=EC=A0=95=20(#234)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/kakaoshare/backend/domain/member/entity/Member.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/kakaoshare/backend/domain/member/entity/Member.java b/src/main/java/org/kakaoshare/backend/domain/member/entity/Member.java index b27feca17..b7e92e611 100644 --- a/src/main/java/org/kakaoshare/backend/domain/member/entity/Member.java +++ b/src/main/java/org/kakaoshare/backend/domain/member/entity/Member.java @@ -63,7 +63,7 @@ protected Member() { } @Builder - public Member(final Long memberId, final Gender gender, final String name, final String phoneNumber, final String providerId) { + public Member(final Long memberId, final Gender gender, final String name, final String phoneNumber, final String providerId, final String profileImageUrl) { this.memberId = memberId; this.gender = gender; this.name = name; From 6696f4f6a5684dfd8d55292cb92a942dd093c85f Mon Sep 17 00:00:00 2001 From: kmw2378 Date: Tue, 28 May 2024 14:11:51 +0900 Subject: [PATCH 10/10] =?UTF-8?q?[refactor]flyway=20ddl=20=EB=B2=84?= =?UTF-8?q?=EC=A0=84=20=EC=88=98=EC=A0=95=20(#234)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{V5__modify_funding_idx.sql => V7__modify_funding_idx.sql} | 0 ..._add_member_profile_url.sql => V8__add_member_profile_url.sql} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/db/migration/{V5__modify_funding_idx.sql => V7__modify_funding_idx.sql} (100%) rename src/main/resources/db/migration/{V7__add_member_profile_url.sql => V8__add_member_profile_url.sql} (100%) diff --git a/src/main/resources/db/migration/V5__modify_funding_idx.sql b/src/main/resources/db/migration/V7__modify_funding_idx.sql similarity index 100% rename from src/main/resources/db/migration/V5__modify_funding_idx.sql rename to src/main/resources/db/migration/V7__modify_funding_idx.sql diff --git a/src/main/resources/db/migration/V7__add_member_profile_url.sql b/src/main/resources/db/migration/V8__add_member_profile_url.sql similarity index 100% rename from src/main/resources/db/migration/V7__add_member_profile_url.sql rename to src/main/resources/db/migration/V8__add_member_profile_url.sql