From ba0750bfb9ec465eeab979f29e9b2ef742c46af0 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期二, 12 八月 2025 22:05:58 +0800
Subject: [PATCH] 修改bug

---
 DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
index d1075d1..9620901 100644
--- a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
+++ b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
@@ -75,6 +75,9 @@
 
     @Autowired
     private TDriverPromotionActivityService driverPromotionActivityService;
+    
+    @Resource
+    private IOpenCityService openCityService;
 
 
 
@@ -146,7 +149,7 @@
             return ResultUtil.error("订单已被抢了");
         }
         OrderTaxi orderTaxi = null;
-        if(null != orderPrivateCar1 && orderPrivateCar1.getType() == 3 && orderPrivateCar1.getState() == 1&& orderPrivateCar1.getState() == 11){
+        if(null != orderPrivateCar1 && orderPrivateCar1.getType() == 3 && (orderPrivateCar1.getState() == 1||  orderPrivateCar1.getState() == 11)){
             orderPrivateCarService.deleteById(orderId);
             OrderTaxi orderTaxi1 = setOrderTaxi(orderPrivateCar1);
             this.insert(orderTaxi1);
@@ -407,7 +410,7 @@
         orderTaxi.setStartServiceTime(date);
         orderTaxi.setBoardingTime(date);
     
-        String value = (String) redisTemplate.opsForValue().get("DRIVER" + uid);
+        String value = (String) redisTemplate.opsForValue().get("dache:DRIVER" + uid);
         if (ToolUtil.isNotEmpty(value)) {
             String[] split = value.split(",");
             Map<String, String> geocode1 = gdMapGeocodingUtil.geocode(split[0], split[1]);
@@ -473,7 +476,9 @@
      */
     @Override
     public Map<String, Object> queryOrderInfo(Integer orderId) throws Exception {
-        return orderTaxiMapper.queryOrderInfo(orderId);
+        OrderTaxi orderTaxi = this.selectById(orderId);
+        OpenCity openCity = openCityService.openCity1(orderTaxi.getStartLon().toString(), orderTaxi.getStartLat().toString());
+        return orderTaxiMapper.queryOrderInfo(orderId, openCity.getId());
     }
 
 

--
Gitblit v1.7.1