diff --git a/build.gradle b/build.gradle index 2d5f5a3..8dedede 100644 --- a/build.gradle +++ b/build.gradle @@ -38,9 +38,9 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' implementation "org.springframework.cloud:spring-cloud-starter-bus-kafka" implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation group: 'io.github.lotteon-maven', name: 'blooming-blooms-utils', version: '0.1.0-alpha2' + implementation 'io.github.lotteon-maven:blooming-blooms-utils:202312260649' runtimeOnly 'com.h2database:h2' - runtimeOnly 'com.mysql:mysql-connector-j' + implementation 'mysql:mysql-connector-java:8.0.33' testImplementation 'org.mock-server:mockserver-netty:5.11.2' // 사용 중인 MockServer 버전 implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' } diff --git a/src/main/java/kr/bb/payment/controller/clientcontroller/OrderClientController.java b/src/main/java/kr/bb/payment/controller/clientcontroller/OrderClientController.java index a6d1bee..c0104f7 100644 --- a/src/main/java/kr/bb/payment/controller/clientcontroller/OrderClientController.java +++ b/src/main/java/kr/bb/payment/controller/clientcontroller/OrderClientController.java @@ -1,13 +1,12 @@ package kr.bb.payment.controller.clientcontroller; -import bloomingblooms.response.SuccessResponse; +import bloomingblooms.response.CommonResponse; import java.time.LocalDateTime; import kr.bb.payment.dto.request.KakaopayApproveRequestDto; import kr.bb.payment.dto.request.KakaopayReadyRequestDto; import kr.bb.payment.dto.response.KakaopayReadyResponseDto; import kr.bb.payment.service.KakaopayService; import lombok.RequiredArgsConstructor; -import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -21,26 +20,16 @@ public class OrderClientController { private final KakaopayService kakaopayService; @PostMapping("/ready") - public SuccessResponse payReady( + public CommonResponse payReady( @RequestBody KakaopayReadyRequestDto readyRequestDto) { - KakaopayReadyResponseDto responseDto = kakaopayService.kakaoPayReady(readyRequestDto); - - return SuccessResponse.builder() - .data(responseDto) - .message(HttpStatus.OK.name()) - .build(); + return CommonResponse.success(kakaopayService.kakaoPayReady(readyRequestDto)); } @PostMapping("/approve") - public SuccessResponse payApprove( + public CommonResponse payApprove( @RequestBody KakaopayApproveRequestDto approveRequestDto) { - LocalDateTime paymentDateTime = kakaopayService.kakaoPayApprove(approveRequestDto); - - return SuccessResponse.builder() - .data(paymentDateTime) - .message(HttpStatus.OK.name()) - .build(); + return CommonResponse.success(kakaopayService.kakaoPayApprove(approveRequestDto)); } } diff --git a/src/main/java/kr/bb/payment/feign/ProductServiceClient.java b/src/main/java/kr/bb/payment/feign/ProductServiceClient.java index 3868aed..6fd089b 100644 --- a/src/main/java/kr/bb/payment/feign/ProductServiceClient.java +++ b/src/main/java/kr/bb/payment/feign/ProductServiceClient.java @@ -1,11 +1,6 @@ package kr.bb.payment.feign; -import bloomingblooms.response.SuccessResponse; -import java.util.List; -import java.util.Map; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestParam; @FeignClient(name = "productServiceClient", url = "${endpoint.product-service") public interface ProductServiceClient {