Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion on-premise/core-payment-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ repositories {

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus'
Expand All @@ -40,6 +39,14 @@ dependencies {

// kafka
implementation 'org.springframework.kafka:spring-kafka'

// validation
implementation 'org.springframework.boot:spring-boot-starter-validation'

// zipkin
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-tracing-bridge-brave'
implementation 'io.zipkin.reporter2:zipkin-reporter-brave'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@AllArgsConstructor
@ToString
public class CashRequestDTO {
private String orderId;
private String loginId; // 사용자 식별자
private Long amount; // 출금액
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@AllArgsConstructor
@ToString
public class CashResponseDTO {
private String orderId; // 주문 식별자
private String loginId; // 사용자 식별자
private String status; // "SUCCESS" or "FAIL"
private String message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public void consumeWithdraw(String message) {

// (4) 성공 이벤트 발행 -> PointService의 토픽 이름인 "core-result"로 변경
CashResponseDTO successResponse = new CashResponseDTO(
requestDto.getOrderId(),
requestDto.getLoginId(),
"SUCCESS",
"정상 출금 완료"
Expand All @@ -88,6 +89,7 @@ public void consumeWithdraw(String message) {
if (requestDto != null) {
// (5) 실패 이벤트 발행
CashResponseDTO failResponse = new CashResponseDTO(
requestDto.getOrderId(),
requestDto.getLoginId(),
"FAIL",
e.getMessage()
Expand Down