diff --git a/src/main/java/com/mpnp/baechelin/review/service/ReviewService.java b/src/main/java/com/mpnp/baechelin/review/service/ReviewService.java index cd97bca..9c8a0ee 100644 --- a/src/main/java/com/mpnp/baechelin/review/service/ReviewService.java +++ b/src/main/java/com/mpnp/baechelin/review/service/ReviewService.java @@ -77,7 +77,7 @@ public void review(ReviewRequestDto reviewRequestDto, String socialId) throws IO tagRepository .saveAll(tagList); reviewImageRepository.saveAll(reviewImageUrlList); reviewRepository .save(review); // 아래의 {store.updatePointAvg()} 보다 리뷰가 먼저 처리되게 해야한다. - storeRepository.save(store.updatePointAvg(reviewRequestDto.getPoint())); //별점 평균 구하는 코드 + storeRepository.save(store.updatePointAvg()); //별점 평균 구하는 코드 } @@ -151,7 +151,7 @@ public void reviewUpdate(ReviewRequestDto reviewRequestDto, String socialId, int review.update(reviewRequestDto); reviewRepository.save(review); // 아래의 store.updatePointAvg() 보다 리뷰가 먼저 처리되게 해야한다. - storeRepository .save(store.updatePointAvg(reviewRequestDto.getPoint())); // 별점 평점 구하는 코드 + storeRepository .save(store.updatePointAvg()); // 별점 평점 구하는 코드 reviewImageRepository.saveAll(reviewImageUrlList); } diff --git a/src/main/java/com/mpnp/baechelin/store/domain/Store.java b/src/main/java/com/mpnp/baechelin/store/domain/Store.java index fead425..5edd89b 100644 --- a/src/main/java/com/mpnp/baechelin/store/domain/Store.java +++ b/src/main/java/com/mpnp/baechelin/store/domain/Store.java @@ -77,7 +77,7 @@ public class Store { public Store(PublicApiV1Form.Row row) { //storeId - 임시 - this.id = Long.valueOf(row.getStoreId()); + this.id = row.getStoreId(); this.name = row.getSISULNAME(); this.address = DataClarification.clarifyString(row.getADDR()); this.phoneNumber = row.getTEL(); @@ -103,7 +103,7 @@ public Store updateBookmarkCount(int upOrDown) { } // TODO 리뷰가 삭제될 때도 고려하기 - 삭제 후 적용되어야 함 - public Store updatePointAvg(double changePoint) { + public Store updatePointAvg() { this.reviewCount = reviewList.size(); double totalPoint = 0.0; for (Review review : reviewList) { @@ -114,7 +114,7 @@ public Store updatePointAvg(double changePoint) { } public Store(LocationInfoDto.LocationResponse sr, PublicApiV2Form.ServList servList, List barrierTagList) { - this.id = Long.valueOf(sr.getStoreId()); + this.id = sr.getStoreId(); this.name = sr.getStoreName(); this.latitude = new BigDecimal(servList.getFaclLat()); this.longitude = new BigDecimal(servList.getFaclLng()); diff --git a/src/main/java/com/mpnp/baechelin/store/domain/StoreImage.java b/src/main/java/com/mpnp/baechelin/store/domain/StoreImage.java index 8dfb05c..6ad9647 100644 --- a/src/main/java/com/mpnp/baechelin/store/domain/StoreImage.java +++ b/src/main/java/com/mpnp/baechelin/store/domain/StoreImage.java @@ -1,6 +1,5 @@ package com.mpnp.baechelin.store.domain; -import com.mpnp.baechelin.review.domain.Review; import com.mpnp.baechelin.util.TimeStamped; import lombok.AllArgsConstructor; import lombok.Builder;