From d9c4252c54adc1684de9b56ad810465945e442a8 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期日, 09 七月 2023 06:20:31 +0800
Subject: [PATCH] 更新支付相关功能及多语言

---
 DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 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 c6b4277..dd8fbc8 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
@@ -108,13 +108,13 @@
      * @throws Exception
      */
     @Override
-    public synchronized ResultUtil grabOrder(Integer orderId, Integer uid) throws Exception {
+    public synchronized ResultUtil grabOrder(Integer orderId, Integer uid, Integer language) throws Exception {
         OrderLogistics orderLogistics = this.selectById(orderId);
         if(orderLogistics.getState() == 10){
-            return ResultUtil.error("订单已取消");
+            return ResultUtil.error(language == 1 ? "订单已取消" : language == 2 ? "Order cancelled" : "Commande annulée");
         }
         if(orderLogistics.getState() != 1){
-            return ResultUtil.error("手速有点慢哦,订单已被抢啦!");
+            return ResultUtil.error(language == 1 ? "手速有点慢哦,订单已被抢啦" : language == 2 ? "A little slow. The order's been taken" : "La main est un peu lente oh l’ordre a été volé");
         }
         Driver driver = driverService.selectById(uid);
         orderLogistics.setDriverId(uid);
@@ -180,7 +180,7 @@
         }).start();
 
         systemNoticeService.addSystemNotice(2, "您已成功抢得小件物流订单,请及时联系客户!", orderLogistics.getDriverId());
-        systemNoticeService.addSystemNotice(1, "您的订单已指派给" + driver.getName().substring(0, 1) + "师傅,请保持电话畅通!", orderLogistics.getUserId());
+        systemNoticeService.addSystemNotice(1, "您的订单已指派给" + driver.getLastName().substring(0, 1) + "师傅,请保持电话畅通!", orderLogistics.getUserId());
 
         return ResultUtil.success();
     }
@@ -209,18 +209,18 @@
      * @throws Exception
      */
     @Override
-    public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception {
+    public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address, Integer language) throws Exception {
         OrderLogistics orderLogistics = this.selectById(orderId);
         switch (state){
             case 3://出发前往预约点
                 orderLogistics.setState(3);
                 orderLogistics.setSetOutTime(new Date());
-                systemNoticeService.addSystemNotice(1, "司机已出发,请耐心等待", orderLogistics.getUserId());
+                systemNoticeService.addSystemNotice(1, language == 1 ? "司机已出发,请耐心等待" : language == 2 ? "The driver has left, please wait patiently" : "Le chauffeur est parti, soyez patient", orderLogistics.getUserId());
                 break;
             case 4://到达预约点,等待客户上车
                 orderLogistics.setState(4);
                 orderLogistics.setArriveTime(new Date());
-                systemNoticeService.addSystemNotice(1, "司机已到达您设置的预约地点。", orderLogistics.getUserId());
+                systemNoticeService.addSystemNotice(1, language == 1 ? "司机已到达您设置的预约地点。" : language == 2 ? "The driver has arrived at the reservation you set" : "e chauffeur est arrivé au lieu de rendez-vous que vous avez défini", orderLogistics.getUserId());
                 break;
             case 5://开始服务
                 orderLogistics.setBoardingLon(lon);
@@ -263,10 +263,10 @@
      * @throws Exception
      */
     @Override
-    public ResultUtil fillInPickUpCode(Integer orderId, String pickUpCode) throws Exception {
+    public ResultUtil fillInPickUpCode(Integer orderId, String pickUpCode, Integer language) throws Exception {
         OrderLogistics orderLogistics = this.selectById(orderId);
         if(!"1246".equals(pickUpCode) && !orderLogistics.getPickUpCode().equals(pickUpCode)){
-            return ResultUtil.error("验证失败");
+            return ResultUtil.error(language == 1 ? "验证失败" : language == 2 ? "Verification failure" : "Échec de vérification");
         }
         orderLogistics.setState(9);
         this.updateById(orderLogistics);
@@ -282,11 +282,11 @@
      * @throws Exception
      */
     @Override
-    public ResultUtil makeUpTheDifference(Integer orderId, Double difference) throws Exception {
+    public ResultUtil makeUpTheDifference(Integer orderId, Double difference, Integer language) throws Exception {
         OrderLogisticsSpread query = orderLogisticsSpreadService.query(orderId);
         OrderLogistics orderLogistics = this.selectById(orderId);
         if(orderLogistics.getState() != 4 && orderLogistics.getState() != 8){
-            return ResultUtil.error("不允许设置差价");
+            return ResultUtil.error(language == 1 ? "不允许设置差价" : language == 2 ? "Price difference is not allowed" : "Les spreads ne sont pas autorisés");
         }
         if(query != null){
             query.setPrice(difference);
@@ -335,13 +335,13 @@
      * @throws Exception
      */
     @Override
-    public synchronized ResultUtil grabOrder_(Integer orderId, Integer uid) throws Exception {
+    public synchronized ResultUtil grabOrder_(Integer orderId, Integer uid, Integer language) throws Exception {
         OrderLogistics orderLogistics = this.selectById(orderId);
         if(orderLogistics.getState() == 10){
-            return ResultUtil.error("订单已取消");
+            return ResultUtil.error(language == 1 ? "订单已取消" : language == 2 ? "Order cancelled" : "Commande annulée");
         }
         if(orderLogistics.getState() != 1){
-            return ResultUtil.error("手速有点慢哦,订单已被抢啦!");
+            return ResultUtil.error(language == 1 ? "手速有点慢哦,订单已被抢啦!" : language == 2 ? "Hand speed is a little slow oh, the order has been robbed!" : "La main est un peu lente oh, l’ordre a été volé!");
         }
         Driver driver = driverService.selectById(uid);
         orderLogistics.setDriverId(uid);
@@ -398,7 +398,7 @@
         }).start();
 
         systemNoticeService.addSystemNotice(2, "您已成功抢得出租车订单,请及时联系客户!", orderLogistics.getDriverId());
-        systemNoticeService.addSystemNotice(1, "您的订单已指派给" + driver.getName().substring(0, 1) + "师傅,请保持电话畅通!", orderLogistics.getUserId());
+        systemNoticeService.addSystemNotice(1, "您的订单已指派给" + driver.getLastName().substring(0, 1) + "师傅,请保持电话畅通!", orderLogistics.getUserId());
 
         return ResultUtil.success();
     }

--
Gitblit v1.7.1