Commit 1138376f7ab8b65ca127cf7400c1066c46949f29
1 parent
5f58dfdc
fix:【PAY 支付】支付示例订单退款时,校验 payRefundId 不正确的问题
Showing
1 changed file
with
2 additions
and
2 deletions
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/demo/PayDemoOrderServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.pay.service.demo; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.lang.Assert; |
| 4 | +import cn.hutool.core.util.ObjUtil; | |
| 4 | 5 | import cn.hutool.core.util.ObjectUtil; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 6 | 7 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| ... | ... | @@ -24,7 +25,6 @@ import java.time.Duration; |
| 24 | 25 | import java.time.LocalDateTime; |
| 25 | 26 | import java.util.HashMap; |
| 26 | 27 | import java.util.Map; |
| 27 | -import java.util.Objects; | |
| 28 | 28 | |
| 29 | 29 | import static cn.hutool.core.util.ObjectUtil.notEqual; |
| 30 | 30 | import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
| ... | ... | @@ -231,7 +231,7 @@ public class PayDemoOrderServiceImpl implements PayDemoOrderService { |
| 231 | 231 | throw exception(DEMO_ORDER_NOT_FOUND); |
| 232 | 232 | } |
| 233 | 233 | // 1.2 校验退款订单匹配 |
| 234 | - if (Objects.equals(order.getPayRefundId(), payRefundId)) { | |
| 234 | + if (ObjUtil.notEqual(order.getPayRefundId(), payRefundId)) { | |
| 235 | 235 | log.error("[validateDemoOrderCanRefunded][order({}) 退款单不匹配({}),请进行处理!order 数据是:{}]", |
| 236 | 236 | id, payRefundId, toJsonString(order)); |
| 237 | 237 | throw exception(DEMO_ORDER_REFUND_FAIL_REFUND_ORDER_ID_ERROR); | ... | ... |