From eb5d7885fa9e4bd20c0827eec9b4cdd48c47b509 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 07 一月 2025 09:11:20 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
index 25fc793..1fe2e7f 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -16,6 +16,7 @@
 import com.ruoyi.order.model.Order;
 import com.ruoyi.order.service.CommissionService;
 import com.ruoyi.order.service.OrderService;
+import com.ruoyi.order.util.payment.model.RefundCallbackResult;
 import com.ruoyi.order.vo.*;
 import com.ruoyi.other.api.domain.BaseSetting;
 import com.ruoyi.other.api.feignClient.BaseSettingClient;
@@ -25,7 +26,10 @@
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import javax.validation.constraints.NotBlank;
+import java.io.IOException;
+import java.io.PrintWriter;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
@@ -318,5 +322,53 @@
     }
 
 
+    /**
+     * 订单取消支付回退
+     * @param refundCallbackResult
+     * @param response
+     * @return
+     */
+    @ResponseBody
+    @GetMapping("/refundPayMoneyCallback")
+    public void refundPayMoneyCallback(RefundCallbackResult refundCallbackResult, HttpServletResponse response){
+        R callback = orderService.refundPayMoneyCallback(refundCallbackResult);
+        if(callback.getCode() == 200){
+            response.setStatus(200);
+            PrintWriter out = null;
+            try {
+                out = response.getWriter();
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+            out.println("success");
+            out.flush();
+            out.close();
+        }
+    }
+
+
+    /**
+     * 取消订单快递费回退
+     * @param refundCallbackResult
+     * @param response
+     */
+    @ResponseBody
+    @GetMapping("/refundExpressPayMoneyCallback")
+    public void refundExpressPayMoneyCallback(RefundCallbackResult refundCallbackResult, HttpServletResponse response){
+        R callback = orderService.refundExpressPayMoneyCallback(refundCallbackResult);
+        if(callback.getCode() == 200){
+            response.setStatus(200);
+            PrintWriter out = null;
+            try {
+                out = response.getWriter();
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+            out.println("success");
+            out.flush();
+            out.close();
+        }
+    }
+
 }
 

--
Gitblit v1.7.1