From 2ab5f166d0fad4b1a860fde3bab1adb46d062c3f Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 23 七月 2025 21:18:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java |   35 +++++++++++++++--------------------
 1 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
index 6b9dfc3..3b1bb49 100644
--- a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
+++ b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
@@ -17,17 +17,13 @@
 import com.stylefeng.guns.modular.system.util.*;
 import com.stylefeng.guns.modular.taxi.model.OrderTaxi;
 import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService;
-import org.gavaghan.geodesy.Ellipsoid;
-import org.gavaghan.geodesy.GeodeticCalculator;
-import org.gavaghan.geodesy.GeodeticCurve;
-import org.gavaghan.geodesy.GlobalCoordinates;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
-import java.math.BigInteger;
 import java.util.*;
 
 
@@ -84,23 +80,24 @@
 
     @Autowired
     private ICompanyService companyService;
-
+    
     @Value("${pushMinistryOfTransport}")
     private boolean pushMinistryOfTransport;
-
+    
     @Autowired
     private ICarService carService;
-
+    
     @Resource
     private CarServiceMapper carServiceMapper;
-
-
-
-
-
+    
+    @Resource
+    private RedisTemplate<String, Object> redisTemplate;
+    
+    
     /**
      * 获取司机端首页订单列表
-     * @param state     1=服务中,2=待服务(30分钟定义预约)
+     *
+     * @param state    1=服务中,2=待服务(30分钟定义预约)
      * @param driverId
      * @return
      * @throws Exception
@@ -164,7 +161,7 @@
                     new EntityWrapper<OrderTaxi>()
                             .eq("type", 2)
                             .eq("userId", orderPrivateCar.getUserId())
-                            .ne("state", 1)
+                            .notIn("state", 1,11)
                             .eq("crossCityOrderId", orderPrivateCar.getCrossCityOrderId())
                             .eq("place", orderPrivateCar.getPlace())
             );
@@ -176,7 +173,7 @@
         if(orderPrivateCar.getState() == 10){
             return ResultUtil.error("订单已取消");
         }
-        if(orderPrivateCar.getState() != 1){
+        if(orderPrivateCar.getState() != 1 && orderPrivateCar.getState() != 11){
             return ResultUtil.error("手速有点慢哦,订单已被抢啦!");
         }
         Driver driver = driverService.selectById(uid);
@@ -298,8 +295,6 @@
     }
 
 
-    @Autowired
-    private RedisUtil redisUtil;
 
     /**
      * 获取订单详情页(服务中的页面)
@@ -322,7 +317,7 @@
             if(order!=null){
                 orders.addAll(order);
             }
-            String value = redisUtil.getValue("DRIVER" + String.valueOf(orderPrivateCar.getDriverId()));
+            String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(orderPrivateCar.getDriverId()));
             order = this.baseMapper.queryOrderInfo(orderId,5,value.split(",")[0],value.split(",")[1]);
             if(order!=null){
                 orders.addAll(order);
@@ -337,7 +332,7 @@
             if(order!=null){
                 orders.addAll(order);
             }
-            String value = redisUtil.getValue("DRIVER" + String.valueOf(orderPrivateCar.getDriverId()));
+            String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(orderPrivateCar.getDriverId()));
             order = this.baseMapper.queryOrderInfo(orderPrivateCar.getPid(),5,value.split(",")[0],value.split(",")[1]);
             if(order!=null){
                 orders.addAll(order);

--
Gitblit v1.7.1