Merge branch 'main' of https://github.com/dg04-hi/hi-backend
This commit is contained in:
commit
52c7e7decc
@ -262,7 +262,7 @@ public class AnalyticsService implements AnalyticsUseCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. 최근 리뷰 데이터 조회 (30일)
|
// 2. 최근 리뷰 데이터 조회 (30일)
|
||||||
List<String> recentReviews = externalReviewPort.getRecentReviews(storeId, 30);
|
List<String> recentReviews = externalReviewPort.getRecentReviews(storeId, days);
|
||||||
|
|
||||||
if (recentReviews.isEmpty()) {
|
if (recentReviews.isEmpty()) {
|
||||||
ReviewAnalysisResponse emptyResponse = ReviewAnalysisResponse.builder()
|
ReviewAnalysisResponse emptyResponse = ReviewAnalysisResponse.builder()
|
||||||
@ -289,8 +289,8 @@ public class AnalyticsService implements AnalyticsUseCase {
|
|||||||
.totalReviews(totalCount)
|
.totalReviews(totalCount)
|
||||||
.positiveReviewCount(positiveCount)
|
.positiveReviewCount(positiveCount)
|
||||||
.negativeReviewCount(negativeCount)
|
.negativeReviewCount(negativeCount)
|
||||||
.positiveRate((double) positiveCount / totalCount * 100)
|
.positiveRate(Math.floor((double) positiveCount / totalCount * 100) / 10.0)
|
||||||
.negativeRate((double) negativeCount / totalCount * 100)
|
.negativeRate(Math.floor((double) negativeCount / totalCount * 100) / 10.0)
|
||||||
.analysisDate(LocalDate.now())
|
.analysisDate(LocalDate.now())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user