From 32705194fca214183a45fcef1d32695f263d6311 Mon Sep 17 00:00:00 2001 From: Su-daa Date: Thu, 25 Jan 2024 16:06:44 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B2=B0=EC=A0=9C=20=EC=B7=A8=EC=86=8C?= =?UTF-8?q?=EC=8B=9C=20db=EC=97=90=20=EC=B7=A8=EC=86=8C=20=EB=82=B4?= =?UTF-8?q?=EC=97=AD=20=EC=A0=80=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goldenticket/domain/payment/service/PaymentService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/site/goldenticket/domain/payment/service/PaymentService.java b/src/main/java/site/goldenticket/domain/payment/service/PaymentService.java index d6f0a347..c57f563b 100644 --- a/src/main/java/site/goldenticket/domain/payment/service/PaymentService.java +++ b/src/main/java/site/goldenticket/domain/payment/service/PaymentService.java @@ -2,6 +2,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import site.goldenticket.common.constants.OrderStatus; import site.goldenticket.common.exception.CustomException; @@ -200,6 +201,7 @@ public Optional findByProductIdAndStatus(Long productId, OrderStatus orde return orderRepository.findByProductIdAndStatus(productId, orderStatus); } + @Transactional(propagation = Propagation.REQUIRES_NEW) public void cancelPayment(String impUid) { List paymentCancelDetails = iamportRepository.cancelPaymentByImpUid(impUid); paymentCancelDetailRepository.saveAll(paymentCancelDetails);