From 8692f6f0807a1e70f3a1988834b0e5d6a8080753 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 20 七月 2023 15:29:51 +0800
Subject: [PATCH] 更新代码

---
 DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java |   35 +++++++++++++++++++++++++++--------
 1 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
index dd8fbc8..ef19b9c 100644
--- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
+++ b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
@@ -10,14 +10,8 @@
 import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsSpreadService;
 import com.stylefeng.guns.modular.system.dao.RegionMapper;
 import com.stylefeng.guns.modular.system.dao.UserInfoMapper;
-import com.stylefeng.guns.modular.system.model.Company;
-import com.stylefeng.guns.modular.system.model.Driver;
-import com.stylefeng.guns.modular.system.model.Region;
-import com.stylefeng.guns.modular.system.model.UserInfo;
-import com.stylefeng.guns.modular.system.service.ICompanyService;
-import com.stylefeng.guns.modular.system.service.IDriverService;
-import com.stylefeng.guns.modular.system.service.IIncomeService;
-import com.stylefeng.guns.modular.system.service.ISystemNoticeService;
+import com.stylefeng.guns.modular.system.model.*;
+import com.stylefeng.guns.modular.system.service.*;
 import com.stylefeng.guns.modular.system.util.*;
 import com.stylefeng.guns.modular.taxi.model.OrderTaxi;
 import org.jsoup.Jsoup;
@@ -82,6 +76,12 @@
 
     @Value("${spring.mail.template-path}")
     private String templatePath;
+
+    @Autowired
+    private IPaymentRecordService paymentRecordService;
+
+    @Autowired
+    private ITransactionDetailsService transactionDetailsService;
 
 
 
@@ -480,4 +480,23 @@
         }
 
     }
+
+
+    @Override
+    public void payOrderLogisticsCallback(Integer id, String order_id, Integer language) throws Exception {
+        OrderLogistics orderLogistics = this.selectById(id);
+        PaymentRecord query = paymentRecordService.query(1, null, 2, Integer.valueOf(id), orderLogistics.getType(), null, 1);
+        if(null != query){
+            //添加交易明细
+            transactionDetailsService.saveData(orderLogistics.getDriverId(), language == 1 ? "现金收款代付" : language == 2 ? "Cash collection on behalf of payment" : "Paiement en espèces", query.getAmount(), 2, 1, 2, orderLogistics.getType(), id);
+            orderLogistics.setDriverPay(2);
+            this.updateById(orderLogistics);
+
+            query.setState(2);
+            query.setCode(order_id);
+            paymentRecordService.updateById(query);
+        }else{
+            System.err.println("预支付数据异常(orderId = "  + id + ")");
+        }
+    }
 }

--
Gitblit v1.7.1