Commit 4e2aed34725bfa8696774d2f2ba43e87147757cf
Merge branch 'main' of git3.nong12.com:cashierdesk/dili-cashier
Showing
2 changed files
with
3 additions
and
4 deletions
cashier-mall/src/main/java/com/diligrp/cashier/mall/service/biz/impl/MallBizRefundServiceImpl.java
| @@ -110,6 +110,7 @@ public class MallBizRefundServiceImpl implements MallBizRefundService { | @@ -110,6 +110,7 @@ public class MallBizRefundServiceImpl implements MallBizRefundService { | ||
| 110 | * 退款成功需要人工处理回调 | 110 | * 退款成功需要人工处理回调 |
| 111 | */ | 111 | */ |
| 112 | private void refundManualEvent(RefundResultBO refundResultBO) { | 112 | private void refundManualEvent(RefundResultBO refundResultBO) { |
| 113 | + LOG.info("refundManualEvent state: {}", Optional.ofNullable(refundResultBO).map(RefundResultBO::getState).orElse(null)); | ||
| 113 | if (Objects.nonNull(refundResultBO) && Objects.equals(refundResultBO.getState(), PaymentState.SUCCESS.getCode())) { | 114 | if (Objects.nonNull(refundResultBO) && Objects.equals(refundResultBO.getState(), PaymentState.SUCCESS.getCode())) { |
| 114 | payNotifyServiceImpl.onEvent(refundResultBO); | 115 | payNotifyServiceImpl.onEvent(refundResultBO); |
| 115 | } | 116 | } |
cashier-mall/src/main/java/com/diligrp/cashier/mall/service/biz/impl/PayNotifyServiceImpl.java
| @@ -18,8 +18,6 @@ import org.slf4j.Logger; | @@ -18,8 +18,6 @@ import org.slf4j.Logger; | ||
| 18 | import org.slf4j.LoggerFactory; | 18 | import org.slf4j.LoggerFactory; |
| 19 | import org.springframework.stereotype.Component; | 19 | import org.springframework.stereotype.Component; |
| 20 | 20 | ||
| 21 | -import java.util.Objects; | ||
| 22 | - | ||
| 23 | /** | 21 | /** |
| 24 | * @ClassName PayNotifyServiceImpl.java | 22 | * @ClassName PayNotifyServiceImpl.java |
| 25 | * @author dengwei | 23 | * @author dengwei |
| @@ -66,8 +64,8 @@ public class PayNotifyServiceImpl implements PayNotifyService { | @@ -66,8 +64,8 @@ public class PayNotifyServiceImpl implements PayNotifyService { | ||
| 66 | @ParamLogPrint(desc = "RefundResultBO") | 64 | @ParamLogPrint(desc = "RefundResultBO") |
| 67 | public void onEvent(RefundResultBO event) { | 65 | public void onEvent(RefundResultBO event) { |
| 68 | MallBizRefund mallBizRefund = mallBizRefundDao.getByRefundTradeId(event.getRefundId()); | 66 | MallBizRefund mallBizRefund = mallBizRefundDao.getByRefundTradeId(event.getRefundId()); |
| 69 | - if (Objects.equals(mallBizRefund.getRefundState(), PaymentState.PENDING.getCode())) { | ||
| 70 | - LOG.info("refundOnEvent refundState is pending, refund_trade_id: {}", mallBizRefund.getRefundTradeId()); | 67 | + if (ObjectUtils.notEqual(mallBizRefund.getRefundState(), PaymentState.PENDING.getCode())) { |
| 68 | + LOG.info("refundOnEvent refundState is pending ignore, refund_trade_id: {}", mallBizRefund.getRefundTradeId()); | ||
| 71 | return; | 69 | return; |
| 72 | } | 70 | } |
| 73 | 71 |