puzhibing
2026-07-17 df22fbc272a1a8debe24ae037470a7c3fcb06571
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/WxPayController.java
@@ -23,6 +23,7 @@
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@@ -125,6 +126,10 @@
    @PostMapping(value = "queryRefund")
    public R<Map<String, Object>> queryRefund(@RequestParam("refund_out_trade_no") String refund_out_trade_no) {
        Map<String, Object> result = wxV3Pay.queryRefund(refund_out_trade_no);
        if(null == result){
            result = new HashMap<>();
            return R.ok(result);
        }
        log.info("订单退款查询结果:{}", result);
        // 微信支付退款单号
        String refund_id = result.get("refund_id").toString();
@@ -187,9 +192,9 @@
            throw new RuntimeException(e);
        }
    }
    /**
     * 退款回调