puzhibing
2025-01-07 eb5d7885fa9e4bd20c0827eec9b4cdd48c47b509
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();
        }
    }
}