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