Skip to content

Commit

Permalink
💚 의존성 수정 및 CommonResponse로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
binarywoo27 committed Dec 26, 2023
1 parent ad1d8ba commit bce6725
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ 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'
implementation 'mysql:mysql-connector-java:8.0.33'
testImplementation 'org.mock-server:mockserver-netty:5.11.2' // 사용 중인 MockServer 버전
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -21,26 +20,16 @@ public class OrderClientController {
private final KakaopayService kakaopayService;

@PostMapping("/ready")
public SuccessResponse<KakaopayReadyResponseDto> payReady(
public CommonResponse<KakaopayReadyResponseDto> payReady(
@RequestBody KakaopayReadyRequestDto readyRequestDto) {

KakaopayReadyResponseDto responseDto = kakaopayService.kakaoPayReady(readyRequestDto);

return SuccessResponse.<KakaopayReadyResponseDto>builder()
.data(responseDto)
.message(HttpStatus.OK.name())
.build();
return CommonResponse.success(kakaopayService.kakaoPayReady(readyRequestDto));
}

@PostMapping("/approve")
public SuccessResponse<LocalDateTime> payApprove(
public CommonResponse<LocalDateTime> payApprove(
@RequestBody KakaopayApproveRequestDto approveRequestDto) {

LocalDateTime paymentDateTime = kakaopayService.kakaoPayApprove(approveRequestDto);

return SuccessResponse.<LocalDateTime>builder()
.data(paymentDateTime)
.message(HttpStatus.OK.name())
.build();
return CommonResponse.success(kakaopayService.kakaoPayApprove(approveRequestDto));
}
}
5 changes: 0 additions & 5 deletions src/main/java/kr/bb/payment/feign/ProductServiceClient.java
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit bce6725

Please sign in to comment.