From 27f38c3aa49e9e4c39c698657de1967aa6a354da Mon Sep 17 00:00:00 2001 From: hyunseo Date: Fri, 15 Nov 2024 00:01:59 +0900 Subject: [PATCH 1/9] =?UTF-8?q?[refactor]=20=EC=9E=91=EC=84=B1=ED=95=9C=20?= =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=EB=B0=98=ED=99=98=EC=97=90=20placeName=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../review/application/dto/MyReviewInfo.java | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/main/java/team7/inplace/review/application/dto/MyReviewInfo.java b/src/main/java/team7/inplace/review/application/dto/MyReviewInfo.java index 115976e6..0306fbea 100644 --- a/src/main/java/team7/inplace/review/application/dto/MyReviewInfo.java +++ b/src/main/java/team7/inplace/review/application/dto/MyReviewInfo.java @@ -1,42 +1,43 @@ package team7.inplace.review.application.dto; +import java.util.Date; import team7.inplace.place.application.dto.PlaceInfo.AddressInfo; import team7.inplace.place.domain.Place; import team7.inplace.review.domain.Review; -import java.util.Date; - public record MyReviewInfo( - Long reviewId, - boolean likes, - String comment, - Date createdDate, - ReviewPlaceInfo placeInfo + Long reviewId, + boolean likes, + String comment, + Date createdDate, + ReviewPlaceInfo placeInfo ) { public record ReviewPlaceInfo( - Long placeId, - String imgUrl, - AddressInfo address + Long placeId, + String placeName, + String imgUrl, + AddressInfo address ) { public static ReviewPlaceInfo from(Place place) { return new ReviewPlaceInfo( - place.getId(), - place.getMenuImgUrl(), - AddressInfo.of(place.getAddress()) + place.getId(), + place.getName(), + place.getMenuImgUrl(), + AddressInfo.of(place.getAddress()) ); } } public static MyReviewInfo from(Review review) { return new MyReviewInfo( - review.getId(), - review.isLiked(), - review.getComment(), - review.getCreatedDate(), - ReviewPlaceInfo.from(review.getPlace()) + review.getId(), + review.isLiked(), + review.getComment(), + review.getCreatedDate(), + ReviewPlaceInfo.from(review.getPlace()) ); } } From 4874ce4d5e832b7534e7ecc2b2952b1abded8ad6 Mon Sep 17 00:00:00 2001 From: sanghee0820 Date: Fri, 15 Nov 2024 01:01:13 +0900 Subject: [PATCH 2/9] =?UTF-8?q?[fix]=20=EC=B5=9C=EC=B4=88=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EB=90=98=EB=8A=94=20=EB=B9=84?= =?UTF-8?q?=EB=94=94=EC=98=A4=EC=9D=98=20=EA=B2=BD=EC=9A=B0,=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=EC=88=98=20=EC=A6=9D=EA=B0=80=EB=9F=89=EC=9D=B4=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/team7/inplace/video/domain/Video.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/team7/inplace/video/domain/Video.java b/src/main/java/team7/inplace/video/domain/Video.java index a645b55b..9fd4ab1a 100644 --- a/src/main/java/team7/inplace/video/domain/Video.java +++ b/src/main/java/team7/inplace/video/domain/Video.java @@ -1,14 +1,19 @@ package team7.inplace.video.domain; -import jakarta.persistence.*; +import static jakarta.persistence.GenerationType.IDENTITY; +import static lombok.AccessLevel.PROTECTED; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; import lombok.Getter; import lombok.NoArgsConstructor; import team7.inplace.influencer.domain.Influencer; import team7.inplace.place.domain.Place; -import static jakarta.persistence.GenerationType.IDENTITY; -import static lombok.AccessLevel.PROTECTED; - @Entity @Getter @NoArgsConstructor(access = PROTECTED) @@ -54,7 +59,7 @@ public String getVideoUUID() { public void updateViewCount(Long viewCount) { if (this.viewCount == -1L) { this.viewCount = viewCount; - this.viewCountIncrease = viewCount; + this.viewCountIncrease = 0L; return; } From 95848d6654fea0211dca2acd5fbb90225e928d68 Mon Sep 17 00:00:00 2001 From: sanghee0820 Date: Fri, 15 Nov 2024 01:01:52 +0900 Subject: [PATCH 3/9] =?UTF-8?q?[fix]=20=EC=A3=BC=EC=86=8C=20=EC=B6=94?= =?UTF-8?q?=EC=B6=9C=20=EA=B2=B0=EA=B3=BC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team7/inplace/crawling/application/AddressUtilTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/team7/inplace/crawling/application/AddressUtilTest.java b/src/test/java/team7/inplace/crawling/application/AddressUtilTest.java index 4d0d0652..bc552fe0 100644 --- a/src/test/java/team7/inplace/crawling/application/AddressUtilTest.java +++ b/src/test/java/team7/inplace/crawling/application/AddressUtilTest.java @@ -1,11 +1,11 @@ package team7.inplace.crawling.application; +import static org.junit.jupiter.api.Assertions.assertEquals; + import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import team7.inplace.admin.crawling.application.AddressUtil; -import static org.junit.jupiter.api.Assertions.assertEquals; - class AddressUtilTest { @DisplayName("주소 추출 테스트 1") @@ -16,7 +16,7 @@ void extractAddressFromJsonNodeTest1() { [참조은 생고기] 대구 북구 복현로 78 (복현2동 266-9) """; - final String address = "대구 북구 복현로 78"; + final String address = "복현로 78"; // when String result = AddressUtil.extractAddressFromString(description); From 9c7839fda1b4f29e059c58222f05793e901dd576 Mon Sep 17 00:00:00 2001 From: sanghee0820 Date: Fri, 15 Nov 2024 01:02:47 +0900 Subject: [PATCH 4/9] =?UTF-8?q?[fix]=20=EC=9C=A0=ED=8A=9C=EB=B8=8C=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C=EB=A1=9C=20=EC=9D=B8=ED=95=B4,=20ex?= =?UTF-8?q?pectedSize=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team7/inplace/crawling/client/YoutubeClientTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/team7/inplace/crawling/client/YoutubeClientTest.java b/src/test/java/team7/inplace/crawling/client/YoutubeClientTest.java index 4f8f16bd..8ea6ee93 100644 --- a/src/test/java/team7/inplace/crawling/client/YoutubeClientTest.java +++ b/src/test/java/team7/inplace/crawling/client/YoutubeClientTest.java @@ -1,5 +1,7 @@ package team7.inplace.crawling.client; +import static org.assertj.core.api.Assertions.assertThat; + import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -7,8 +9,6 @@ import org.springframework.test.context.ActiveProfiles; import team7.inplace.admin.crawling.client.YoutubeClient; -import static org.assertj.core.api.Assertions.assertThat; - @SpringBootTest @ActiveProfiles("test") class YoutubeClientTest { @@ -22,9 +22,9 @@ void crawlingTest() { final String videoId = null; var response = youtubeClient.getVideos(playlistId, videoId); - // 2024. 10. 2기준 154개 + // 2024. 11. 15일기준 157개 // regex로 판별되는 기준 138개 - final int expectedSize = 154; + final int expectedSize = 157; assertThat(response.size()) .isEqualTo(expectedSize); } From 6a74836be316b16b993664d257e3a8037c39557a Mon Sep 17 00:00:00 2001 From: dong_yxxn Date: Fri, 15 Nov 2024 01:37:44 +0900 Subject: [PATCH 5/9] =?UTF-8?q?[fix]:=20ReviewRepositoryTest=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - transactional 제거하여 테스트 한꺼번에 돌릴때 db 오류발생을 해결하였습니다. --- .../team7/inplace/review/persistence/ReviewRepositoryTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/java/team7/inplace/review/persistence/ReviewRepositoryTest.java b/src/test/java/team7/inplace/review/persistence/ReviewRepositoryTest.java index 09f0972a..20978fc8 100644 --- a/src/test/java/team7/inplace/review/persistence/ReviewRepositoryTest.java +++ b/src/test/java/team7/inplace/review/persistence/ReviewRepositoryTest.java @@ -11,7 +11,6 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.annotation.Transactional; import team7.inplace.config.annotation.CustomRepositoryTest; import team7.inplace.place.domain.Place; import team7.inplace.review.domain.Review; @@ -20,7 +19,6 @@ import team7.inplace.user.domain.UserType; @CustomRepositoryTest -@Transactional class ReviewRepositoryTest { @PersistenceContext From 6c4d0cb758472d3b7b938a06fe8bae3041f02f1e Mon Sep 17 00:00:00 2001 From: hyunseo Date: Fri, 15 Nov 2024 01:56:13 +0900 Subject: [PATCH 6/9] =?UTF-8?q?[refactor]=20=EB=B0=98=ED=99=98=EC=97=90=20?= =?UTF-8?q?=EB=8C=80=EB=AC=B8=EC=9E=90=EB=A5=BC=20=EC=86=8C=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/LikedInfluencerResponse.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/team7/inplace/user/presentation/dto/LikedInfluencerResponse.java b/src/main/java/team7/inplace/user/presentation/dto/LikedInfluencerResponse.java index db122195..b259c1ac 100644 --- a/src/main/java/team7/inplace/user/presentation/dto/LikedInfluencerResponse.java +++ b/src/main/java/team7/inplace/user/presentation/dto/LikedInfluencerResponse.java @@ -3,20 +3,20 @@ import team7.inplace.influencer.application.dto.InfluencerInfo; public record LikedInfluencerResponse( - Long influencerId, - String InfluencerName, - String InfluencerImgUrl, - String influencerJob, - boolean likes + Long influencerId, + String influencerName, + String influencerImgUrl, + String influencerJob, + boolean likes ) { public static LikedInfluencerResponse from(InfluencerInfo influencerInfo) { return new LikedInfluencerResponse( - influencerInfo.influencerId(), - influencerInfo.influencerName(), - influencerInfo.influencerImgUrl(), - influencerInfo.influencerJob(), - influencerInfo.likes() + influencerInfo.influencerId(), + influencerInfo.influencerName(), + influencerInfo.influencerImgUrl(), + influencerInfo.influencerJob(), + influencerInfo.likes() ); } } From 580c893087610df2dd03290898e7def663a05040 Mon Sep 17 00:00:00 2001 From: BaeJunho Date: Fri, 15 Nov 2024 02:00:25 +0900 Subject: [PATCH 7/9] =?UTF-8?q?[fix]=20=EB=85=BC=EB=A6=AC=EC=A0=81=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/team7/inplace/video/persistence/VideoRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/team7/inplace/video/persistence/VideoRepository.java b/src/main/java/team7/inplace/video/persistence/VideoRepository.java index 83fb10da..b6257a40 100644 --- a/src/main/java/team7/inplace/video/persistence/VideoRepository.java +++ b/src/main/java/team7/inplace/video/persistence/VideoRepository.java @@ -14,7 +14,7 @@ public interface VideoRepository extends JpaRepository { @Query("SELECT v FROM Video v JOIN FETCH v.place JOIN FETCH v.influencer ORDER BY v.viewCountIncrease DESC") List