From b19474186df25762866bd9323c3f3ac8be4de9b9 Mon Sep 17 00:00:00 2001
From: yanderong <307678080@qq.com>
Date: 星期二, 09 六月 2026 14:44:16 +0800
Subject: [PATCH] feat:司机APP充值对接微信支付和数据上报

---
 DriverOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/CallbackController.java |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/DriverOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/CallbackController.java b/DriverOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/CallbackController.java
index 586ef7b..7115213 100644
--- a/DriverOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/CallbackController.java
+++ b/DriverOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/CallbackController.java
@@ -4,10 +4,11 @@
 import com.stylefeng.guns.modular.system.model.Driver;
 import com.stylefeng.guns.modular.system.model.TransactionDetails;
 import com.stylefeng.guns.modular.system.service.IDriverService;
+import com.stylefeng.guns.modular.system.service.IPayService;
 import com.stylefeng.guns.modular.system.service.IReassignService;
 import com.stylefeng.guns.modular.system.service.ITransactionDetailsService;
 import com.stylefeng.guns.modular.system.util.PayMoneyUtil;
-import com.stylefeng.guns.modular.system.util.ResultUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -22,6 +23,7 @@
 /**
  * 第三方支付回调控制器
  */
+@Slf4j
 @RestController
 @RequestMapping("/base")
 public class CallbackController {
@@ -36,6 +38,8 @@
     private ITransactionDetailsService transactionDetailsService;
     @Autowired
     private IDriverService driverService;
+    @Autowired
+    private IPayService payService;
 
     // 司机端充值余额 微信回调
 @ResponseBody
@@ -126,4 +130,19 @@
             e.printStackTrace();
         }
     }
+
+    /**
+     * 司机端充值余额 微信回调(app)
+     */
+    @ResponseBody
+    @PostMapping("/wechat/notify")
+    public Map<String,Object> wechatNotify(HttpServletRequest request) {
+        try {
+            log.info("司机微信充值-收到回调请求");
+            return payService.wechatNotify(request);
+        } catch (Exception e) {
+            log.error("司机微信充值-回调处理报错异常:", e);
+        }
+        return null;
+    }
 }

--
Gitblit v1.7.1