diff --git a/backend/live/src/main/resources/application-prod.yml b/backend/live/src/main/resources/application-prod.yml index c9935213..d92575f6 100644 --- a/backend/live/src/main/resources/application-prod.yml +++ b/backend/live/src/main/resources/application-prod.yml @@ -15,7 +15,7 @@ spring: driver-class-name: org.mariadb.jdbc.Driver jpa: hibernate: - ddl-auto: update + ddl-auto: create database: mysql database-platform: org.hibernate.dialect.MariaDBDialect generate-ddl: true diff --git a/backend/member/src/main/resources/application-prod.yml b/backend/member/src/main/resources/application-prod.yml index 089197f8..e95d667d 100644 --- a/backend/member/src/main/resources/application-prod.yml +++ b/backend/member/src/main/resources/application-prod.yml @@ -16,7 +16,7 @@ spring: tomcat.initial-size: 3 # 적절한 수치로 조정 jpa: hibernate: - ddl-auto: update + ddl-auto: create database: mysql database-platform: org.hibernate.dialect.MariaDBDialect generate-ddl: true diff --git a/backend/order/src/main/resources/application-prod.yml b/backend/order/src/main/resources/application-prod.yml index a3c8651a..11d824e0 100644 --- a/backend/order/src/main/resources/application-prod.yml +++ b/backend/order/src/main/resources/application-prod.yml @@ -15,7 +15,7 @@ spring: driver-class-name: org.mariadb.jdbc.Driver jpa: hibernate: - ddl-auto: update + ddl-auto: create database: mysql database-platform: org.hibernate.dialect.MariaDBDialect generate-ddl: true diff --git a/backend/product/src/main/java/org/samtuap/inong/domain/farm/service/FarmService.java b/backend/product/src/main/java/org/samtuap/inong/domain/farm/service/FarmService.java index 9d3078b2..144931e1 100644 --- a/backend/product/src/main/java/org/samtuap/inong/domain/farm/service/FarmService.java +++ b/backend/product/src/main/java/org/samtuap/inong/domain/farm/service/FarmService.java @@ -25,6 +25,7 @@ import org.samtuap.inong.domain.product.repository.PackageProductRepository; import org.samtuap.inong.domain.seller.dto.FarmCategoryResponse; import org.samtuap.inong.domain.seller.dto.SellerFarmInfoUpdateRequest; +import org.samtuap.inong.search.document.FarmDocument; import org.samtuap.inong.search.service.FarmSearchService; import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; @@ -191,8 +192,8 @@ public FarmCreateResponse createFarm(FarmCreateRequest request, Long sellerId) { } // elasticsearch✔️ : open search에 인덱싱 -// FarmDocument farmDocument = FarmDocument.convertToDocument(farm); -// farmSearchService.indexFarmDocument(farmDocument); + FarmDocument farmDocument = FarmDocument.convertToDocument(farm); + farmSearchService.indexFarmDocument(farmDocument); return FarmCreateResponse.fromEntity(farm); } @@ -229,8 +230,8 @@ public void updateFarmInfo(Long sellerId, SellerFarmInfoUpdateRequest infoUpdate } // elasticsearch✔️ : open search에 수정 -// FarmDocument farmDocument = FarmDocument.convertToDocument(farm); -// farmSearchService.updateFarm(farmDocument); + FarmDocument farmDocument = FarmDocument.convertToDocument(farm); + farmSearchService.updateFarm(farmDocument); } public List getAllFarmCategories() { diff --git a/backend/product/src/main/java/org/samtuap/inong/domain/seller/service/SellerService.java b/backend/product/src/main/java/org/samtuap/inong/domain/seller/service/SellerService.java index 45d8e20e..8b31960e 100644 --- a/backend/product/src/main/java/org/samtuap/inong/domain/seller/service/SellerService.java +++ b/backend/product/src/main/java/org/samtuap/inong/domain/seller/service/SellerService.java @@ -15,6 +15,7 @@ import org.samtuap.inong.domain.seller.jwt.domain.JwtToken; import org.samtuap.inong.domain.seller.jwt.service.JwtService; import org.samtuap.inong.domain.seller.repository.SellerRepository; +import org.samtuap.inong.search.service.FarmSearchService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import static org.samtuap.inong.common.exceptionType.SellerExceptionType.*; @@ -35,6 +36,7 @@ public class SellerService { private final JwtService jwtService; private final PackageProductRepository packageProductRepository; private final RedisTool redisUtil; + private final FarmSearchService farmSearchService; @Transactional public boolean verifyAuthCode(String email, String code) { @@ -113,7 +115,7 @@ public void withDraw(Long sellerId, String password) { // 농장 삭제 진행 farmRepository.delete(farm); // elasticsearch✔️ : 삭제 -// farmSearchService.deleteFarm(String.valueOf(farm.getId())); + farmSearchService.deleteFarm(String.valueOf(farm.getId())); } // 삭제되지 않은 패키지가 없으면 농장과 판매자 삭제 진행 diff --git a/backend/product/src/main/resources/application-prod.yml b/backend/product/src/main/resources/application-prod.yml index 8b6f1d66..f3014f5d 100644 --- a/backend/product/src/main/resources/application-prod.yml +++ b/backend/product/src/main/resources/application-prod.yml @@ -16,7 +16,7 @@ spring: jpa: hibernate: - ddl-auto: update + ddl-auto: create database: mysql database-platform: org.hibernate.dialect.MariaDBDialect generate-ddl: true