Skip to content

Commit

Permalink
♻️ Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
nowgnas committed Dec 28, 2023
1 parent 9774040 commit 8ac7199
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 118 deletions.
51 changes: 0 additions & 51 deletions src/main/java/kr/bb/product/common/dto/NewOrderEvent.java

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/java/kr/bb/product/common/dto/ReviewRegisterEvent.java

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/java/kr/bb/product/common/dto/ReviewType.java

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/java/kr/bb/product/common/dto/StorePolicy.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package kr.bb.product.domain.product.adapter.out.mongo;

import bloomingblooms.domain.order.NewOrderEvent.ProductCount;
import bloomingblooms.domain.review.ReviewRegisterEvent;
import java.util.List;
import kr.bb.product.common.dto.NewOrderEvent.ProductCount;
import kr.bb.product.common.dto.ReviewRegisterEvent;
import kr.bb.product.domain.product.application.port.out.ProductCommandOutPort;
import kr.bb.product.domain.product.entity.Product;
import kr.bb.product.domain.product.entity.ProductSaleStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package kr.bb.product.domain.product.application.handler;

import kr.bb.product.common.dto.NewOrderEvent;
import kr.bb.product.common.dto.ReviewRegisterEvent;
import bloomingblooms.domain.order.NewOrderEvent;
import bloomingblooms.domain.review.ReviewRegisterEvent;
import kr.bb.product.domain.product.application.usecase.ProductCommandUseCase;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package kr.bb.product.domain.product.application.port.in;

import bloomingblooms.domain.order.NewOrderEvent;
import bloomingblooms.domain.review.ReviewRegisterEvent;
import java.util.List;
import kr.bb.product.common.dto.NewOrderEvent;
import kr.bb.product.common.dto.ReviewRegisterEvent;
import kr.bb.product.domain.category.entity.Category;
import kr.bb.product.domain.category.repository.jpa.CategoryRepository;
import kr.bb.product.domain.flower.mapper.FlowerCommand.ProductFlowers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
import bloomingblooms.domain.product.ProductInformation;
import bloomingblooms.domain.product.ProductThumbnail;
import bloomingblooms.domain.product.StoreSubscriptionProductId;
import bloomingblooms.domain.store.StorePolicy;
import bloomingblooms.domain.wishlist.cart.GetUserCartItemsResponse;
import bloomingblooms.domain.wishlist.likes.LikedProductInfoResponse;
import bloomingblooms.errors.EntityNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import kr.bb.product.common.dto.StorePolicy;
import kr.bb.product.domain.flower.adapter.out.jpa.FlowerJpaRepository;
import kr.bb.product.domain.flower.application.port.out.FlowerQueryOutPort;
import kr.bb.product.domain.flower.entity.Flower;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package kr.bb.product.domain.product.application.port.out;

import bloomingblooms.domain.order.NewOrderEvent.ProductCount;
import bloomingblooms.domain.review.ReviewRegisterEvent;
import java.util.List;
import kr.bb.product.common.dto.NewOrderEvent.ProductCount;
import kr.bb.product.common.dto.ReviewRegisterEvent;
import kr.bb.product.domain.product.entity.Product;
import kr.bb.product.domain.product.entity.ProductSaleStatus;
import kr.bb.product.domain.product.mapper.ProductCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package kr.bb.product.domain.product.application.usecase;

import bloomingblooms.domain.order.NewOrderEvent.ProductCount;
import bloomingblooms.domain.review.ReviewRegisterEvent;
import java.util.List;
import kr.bb.product.common.dto.NewOrderEvent.ProductCount;
import kr.bb.product.common.dto.ReviewRegisterEvent;
import kr.bb.product.domain.product.mapper.ProductCommand;

public interface ProductCommandUseCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import bloomingblooms.domain.flower.StockChangeDto;
import bloomingblooms.domain.store.StoreName;
import bloomingblooms.domain.store.StorePolicy;
import bloomingblooms.response.CommonResponse;
import io.github.resilience4j.circuitbreaker.annotation.CircuitBreaker;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import kr.bb.product.common.dto.StorePolicy;
import kr.bb.product.config.OpenFeignClientConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package kr.bb.product.domain.product.infrastructure.message;

import bloomingblooms.domain.order.NewOrderEvent;
import bloomingblooms.domain.review.ReviewRegisterEvent;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.Map;
import kr.bb.product.common.dto.NewOrderEvent;
import kr.bb.product.common.dto.ReviewRegisterEvent;
import kr.bb.product.domain.product.application.handler.ProductCommandHandler;
import kr.bb.product.domain.product.application.handler.ProductQueryHandler;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import bloomingblooms.domain.product.ProductInformation;
import bloomingblooms.domain.product.ProductThumbnail;
import bloomingblooms.domain.product.StoreSubscriptionProductId;
import bloomingblooms.domain.store.StorePolicy;
import bloomingblooms.domain.wishlist.cart.CartProductItemInfo;
import bloomingblooms.domain.wishlist.cart.GetUserCartItemsResponse;
import bloomingblooms.domain.wishlist.likes.LikedProductInfoResponse;
Expand All @@ -15,7 +16,6 @@
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import kr.bb.product.common.dto.StorePolicy;
import kr.bb.product.domain.category.entity.CategoryCommand;
import kr.bb.product.domain.category.entity.CategoryCommand.CategoryDetail;
import kr.bb.product.domain.flower.entity.Flower;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package kr.bb.product.domain.review.infrastructure.event;

import bloomingblooms.domain.review.ReviewRegisterEvent;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import kr.bb.product.common.dto.ReviewRegisterEvent;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package kr.bb.product.domain.review.mapper;

import bloomingblooms.domain.review.ReviewRegisterEvent;
import bloomingblooms.domain.review.ReviewType;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
import kr.bb.product.common.dto.ReviewRegisterEvent;
import kr.bb.product.common.dto.ReviewType;
import kr.bb.product.domain.review.entity.Review;
import kr.bb.product.domain.review.entity.ReviewImages;
import kr.bb.product.domain.review.mapper.mapper.ReviewImageMapper;
Expand All @@ -21,7 +21,6 @@ public static ReviewRegisterEvent getReviewRegisterEventData(String productId, R
return ReviewRegisterEvent.builder()
.reviewRating(review.getRating())
.productId(productId)
.id(review.id)
.reviewType(review.reviewType) // TODO: review type required
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

import bloomingblooms.domain.order.NewOrderEvent.ProductCount;
import bloomingblooms.domain.review.ReviewRegisterEvent;
import bloomingblooms.domain.review.ReviewType;
import java.util.ArrayList;
import java.util.List;
import kr.bb.product.common.dto.NewOrderEvent.ProductCount;
import kr.bb.product.common.dto.ReviewRegisterEvent;
import kr.bb.product.common.dto.ReviewType;
import kr.bb.product.domain.product.entity.Product;
import kr.bb.product.domain.product.mapper.ProductCommand;
import org.junit.jupiter.api.DisplayName;
Expand Down

0 comments on commit 8ac7199

Please sign in to comment.