From 4e7c452c0194978d665150a57c82cd46e0d480dc Mon Sep 17 00:00:00 2001 From: hong seokho Date: Fri, 10 May 2024 07:36:15 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix=20:=20=EC=BF=BC=EB=A6=AC=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../generic_capsule/repository/CapsuleQueryRepository.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java index a77cc11b3..505e9371e 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java @@ -56,8 +56,7 @@ public List findARCapsuleSummaryDtosByCurrentLocation .join(capsule.capsuleSkin, capsuleSkin) .join(capsule.member, member) .where(ST_Contains(mbr, capsule.point).and(capsule.member.id.eq(memberId) - .and(eqCapsuleType(capsuleType))) - .and(capsule.type.eq(CapsuleType.PUBLIC))) + .and(eqCapsuleType(capsuleType)))) .fetch(); } From ccc7b86d75e76ff374d990127d1d3a8bc05a3840 Mon Sep 17 00:00:00 2001 From: hong seokho Date: Fri, 10 May 2024 07:36:25 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix=20:=20test=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/CapsuleQueryRepositoryTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/core/src/test/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepositoryTest.java b/backend/core/src/test/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepositoryTest.java index d4ee5bd00..f3d6a84fd 100644 --- a/backend/core/src/test/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepositoryTest.java +++ b/backend/core/src/test/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepositoryTest.java @@ -134,6 +134,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> c.capsuleType().equals(capsuleType)); assertThat(capsules).allMatch(c -> myCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); @@ -153,6 +154,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> c.capsuleType().equals(capsuleType)); assertThat(capsules).allMatch(c -> myCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); @@ -172,6 +174,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> c.capsuleType().equals(capsuleType)); assertThat(capsules).allMatch(c -> myCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); @@ -191,6 +194,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> c.capsuleType().equals(capsuleType)); assertThat(capsules).allMatch(c -> myCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); @@ -210,6 +214,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch( c -> c.capsuleType().equals(CapsuleType.PUBLIC) || c.capsuleType().equals(CapsuleType.SECRET) || @@ -233,6 +238,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch( c -> c.capsuleType().equals(CapsuleType.PUBLIC) || c.capsuleType().equals(CapsuleType.SECRET) || @@ -255,6 +261,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> friendCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> c.capsuleType().equals(CapsuleType.PUBLIC)); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); @@ -268,11 +275,12 @@ void setup(@Autowired EntityManager entityManager) { //when List capsules = capsuleQueryRepository.findFriendsARCapsulesByCurrentLocation( - friendCapsuleIds, mbr + friendIds, mbr ); //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> friendCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> c.capsuleType().equals(CapsuleType.PUBLIC)); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); From e7d45accc2ed8189c7d1f0286497485035327055 Mon Sep 17 00:00:00 2001 From: hong seokho Date: Sun, 12 May 2024 22:05:28 +0900 Subject: [PATCH 3/5] feat : submodule update --- backend/core/src/main/resources/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/core/src/main/resources/config b/backend/core/src/main/resources/config index 681c69474..4fe1e48ab 160000 --- a/backend/core/src/main/resources/config +++ b/backend/core/src/main/resources/config @@ -1 +1 @@ -Subproject commit 681c69474e3afa430e02274b5478a21375c429ee +Subproject commit 4fe1e48abbffd2db9e7662a622c12747c239c79f From fbf28b5d3221109b1082ff26bf645a40ed77e659 Mon Sep 17 00:00:00 2001 From: GaBaljaintheroom Date: Tue, 14 May 2024 15:38:32 +0900 Subject: [PATCH 4/5] =?UTF-8?q?chore:=20=EC=95=8C=EB=A6=BC=20ymal=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/notification/src/main/resources/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/notification/src/main/resources/config b/backend/notification/src/main/resources/config index 9ba78f7fb..8d3af3cc4 160000 --- a/backend/notification/src/main/resources/config +++ b/backend/notification/src/main/resources/config @@ -1 +1 @@ -Subproject commit 9ba78f7fb830e195236ce34d400b5a9535683e35 +Subproject commit 8d3af3cc4263c89e6f6421770e64bc9083a7ad6d From 22e6de205cf1d92c5777d8c734018a230b02f361 Mon Sep 17 00:00:00 2001 From: GaBaljaintheroom Date: Tue, 14 May 2024 15:54:35 +0900 Subject: [PATCH 5/5] =?UTF-8?q?refact=20:=20=EC=A0=84=ED=99=94=EB=B2=88?= =?UTF-8?q?=ED=98=B8=20=EC=9D=B8=EC=A6=9D=20=ED=9B=84=20=EC=8B=9D=EB=B3=84?= =?UTF-8?q?=20=EB=A9=A4=EB=B2=84=20id=20=EB=B0=98=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth/service/MessageVerificationService.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/auth/service/MessageVerificationService.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/auth/service/MessageVerificationService.java index 3f9aa0324..69cd6f204 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/auth/service/MessageVerificationService.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/auth/service/MessageVerificationService.java @@ -93,9 +93,9 @@ public TokenResponse validVerificationMessage( throw new CertificationNumberNotMatchException(); } - updateToVerifiedMember(memberId, plain); + final Long verifiedMemberId = updateToVerifiedMember(memberId, plain); - return tokenManager.createNewToken(memberId); + return tokenManager.createNewToken(verifiedMemberId); } private boolean isNotMatch(final String certificationNumber, @@ -103,15 +103,17 @@ private boolean isNotMatch(final String certificationNumber, return !certificationNumber.equals(findCertificationNumber); } - private void updateToVerifiedMember(final Long memberId, final byte[] plain) { + private Long updateToVerifiedMember(final Long memberId, final byte[] plain) { final MemberTemporary memberTemporary = memberTemporaryRepository.findById(memberId) .orElseThrow(MemberNotFoundException::new); memberTemporaryRepository.delete(memberTemporary); - final Member member = memberTemporary.toMember(hashEncryptionManager.encrypt(plain), + final Member verifiedMember = memberTemporary.toMember(hashEncryptionManager.encrypt(plain), aesEncryptionManager.encryptWithPrefixIV(plain)); - memberRepository.save(member); + memberRepository.save(verifiedMember); + + return verifiedMember.getId(); } }