Commit eca9307344e235e506b53eddae12c3fdabeb224c
1 parent
a6901845
fix:【MALL 商城】修复退款通知中 merchantRefundId 字符串转换 Long 类型的问题
Showing
1 changed file
with
2 additions
and
3 deletions
yudao-module-mall/yudao-module-trade/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/aftersale/AfterSaleController.java
| @@ -141,9 +141,8 @@ public class AfterSaleController { | @@ -141,9 +141,8 @@ public class AfterSaleController { | ||
| 141 | public CommonResult<Boolean> updateAfterSaleRefunded(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) { | 141 | public CommonResult<Boolean> updateAfterSaleRefunded(@RequestBody PayRefundNotifyReqDTO notifyReqDTO) { |
| 142 | log.info("[updateAfterRefund][notifyReqDTO({})]", notifyReqDTO); | 142 | log.info("[updateAfterRefund][notifyReqDTO({})]", notifyReqDTO); |
| 143 | if (StrUtil.startWithAny(notifyReqDTO.getMerchantRefundId(), "order-")) { | 143 | if (StrUtil.startWithAny(notifyReqDTO.getMerchantRefundId(), "order-")) { |
| 144 | - tradeOrderUpdateService.updatePaidOrderRefunded( | ||
| 145 | - Long.parseLong(notifyReqDTO.getMerchantRefundId()), | ||
| 146 | - notifyReqDTO.getPayRefundId()); | 144 | + Long orderId = Long.parseLong(StrUtil.subAfter(notifyReqDTO.getMerchantRefundId(), "order-", true)); |
| 145 | + tradeOrderUpdateService.updatePaidOrderRefunded(orderId, notifyReqDTO.getPayRefundId()); | ||
| 147 | } else { | 146 | } else { |
| 148 | afterSaleService.updateAfterSaleRefunded( | 147 | afterSaleService.updateAfterSaleRefunded( |
| 149 | Long.parseLong(notifyReqDTO.getMerchantRefundId()), | 148 | Long.parseLong(notifyReqDTO.getMerchantRefundId()), |