From 8b09fbc19a96b57bf1d0e4d7c79b51a76aeca554 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 28 三月 2025 19:57:56 +0800
Subject: [PATCH] 修改bug

---
 DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml |  242 +++---------------------------------------------
 1 files changed, 15 insertions(+), 227 deletions(-)

diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml
index 98cedf2..3b2574e 100644
--- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml
+++ b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/dao/mapping/OrderPrivateCarMapper.xml
@@ -110,26 +110,7 @@
             <if test="null != driverId">
                 and driverId = #{driverId}
             </if>
-            and state = 2 and (UNIX_TIMESTAMP(travelTime) - UNIX_TIMESTAMP(now())) &lt; 1800
-
-            UNION ALL
-
-            select
-            id as id,
-            (1) as type,
-            if(#{language} = 1, '打车', if(#{language} = 2 , 'Ride', 'Course')) as `name`,
-            DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i:%s') as time,
-            startAddress as startAddress,
-            endAddress as endAddress,
-            state as state,
-            orderType as reservation,
-            driverId as driverId,
-            isFrozen
-            from t_order_private_car where 1 = 1
-            <if test="null != driverId">
-                and driverId = #{driverId}
-            </if>
-            and state in (3, 4, 5, 6, 11)
+            and (state in (3, 4, 5, 6, 11) or (state = 2 and (UNIX_TIMESTAMP(travelTime) - UNIX_TIMESTAMP(now())) &lt; 1800))
         </if>
         <if test="state == 2">
             select
@@ -170,7 +151,7 @@
         remark as remark,
         driverPay,
         cancelMidway,
-         as settleAccounts
+        isFrozen
         from t_order_private_car
         where driverId = #{driverId}
         <if test="state == 1">
@@ -242,8 +223,7 @@
         a.bindId as bindId,
         (
         (select count(id) from t_order_private_car where userId = b.id and state in (8, 9)) +
-        (select count(id) from t_order_taxi where userId = b.id and state in (8, 9)) +
-        (select count(id) from t_order_cross_city where userId = b.id and state in (8, 9))
+        (select count(id) from t_order_logistics where userId = b.id and state in (8, 9))
         ) as historyNum,
         (select phone from t_phone where companyId = a.companyId and `type` = 1) as emergencyCall,
         c.reason as cancelReason,
@@ -254,7 +234,12 @@
         a.driverPay,
         a.isFrozen,
         a.tripId,
-        DATE_FORMAT(a.snatchOrderTime, '%Y-%m-%d %H:%i:%s') as snatchOrderTime
+        a.companyId,
+        DATE_FORMAT(a.snatchOrderTime, '%Y-%m-%d %H:%i:%s') as snatchOrderTime,
+        a.cancelMidway,
+        DATE_FORMAT(a.estimateArriveTime, '%Y-%m-%d %H:%i:%s') as estimateArriveTime,
+        a.estimateArriveMileage,
+        a.orderType
         from t_order_private_car a
         left join t_user b on (a.userId = b.id)
         left join t_order_cancel c on (a.id = c.orderId and c.orderType = 1 and c.state = 2)
@@ -262,155 +247,13 @@
     </select>
 
 
-    <select  id="taskMidAxbUnBindSend" resultType="OrderPrivateCar">
-        select
-        id as id,
-        `type` as `type`,
-        userId as userId,
-        serverCarModelId as serverCarModelId,
-        driverId as driverId,
-        carId as carId,
-        orderNum as orderNum,
-        placementLon as placementLon,
-        placementLat as placementLat,
-        placementAddress as placementAddress,
-        startLon as startLon,
-        startLat as startLat,
-        startAddress as startAddress,
-        endLon as endLon,
-        endLat as endLat,
-        endAddress as endAddress,
-        boardingLon as boardingLon,
-        boardingLat as boardingLat,
-        boardingAddress as boardingAddress,
-        boardingTime as boardingTime,
-        getoffLon as getoffLon,
-        getoffLat as getoffLat,
-        getoffAddress as getoffAddress,
-        getoffTime as getoffTime,
-        mileage as mileage,
-        payManner as payManner,
-        payType as payType,
-        orderMoney as orderMoney,
-        startMileage as startMileage,
-        startMoney as startMoney,
-        mileageKilometers as mileageKilometers,
-        mileageMoney as mileageMoney,
-        duration as duration,
-        durationMoney as durationMoney,
-        wait as wait,
-        waitMoney as waitMoney,
-        longDistance as longDistance,
-        longDistanceMoney as longDistanceMoney,
-        parkMoney as parkMoney,
-        roadTollMoney as roadTollMoney,
-        redPacketMoney as redPacketMoney,
-        couponMoney as couponMoney,
-        redPacketId as redPacketId,
-        couponId as couponId,
-        discount as discount,
-        discountMoney as discountMoney,
-        activityId as activityId,
-        companyId as companyId,
-        payMoney as payMoney,
-        substitute as substitute,
-        passengers as passengers,
-        passengersPhone as passengersPhone,
-        state as state,
-        insertTime as insertTime,
-        travelTime as travelTime,
-        snatchOrderTime as snatchOrderTime,
-        setOutTime as setOutTime,
-        arriveTime as arriveTime,
-        startServiceTime as startServiceTime,
-        endServiceTime as endServiceTime,
-        orderType as orderType,
-        orderSource as orderSource,
-        invoiceId as invoiceId,
-        isReassign as isReassign,
-        reassignNotice as reassignNotice,
-        trackId as trackId,
-        isDelete as isDelete,
-        oldState as oldState,
-        telX as telX,
-        bindId as bindId
-        from t_order_private_car where (state in (8, 9) and telX != '' and telX is not null and (UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(endServiceTime)) > 1800) or (state = 10 and telX != '' and telX is not null)
+    <select  id="taskMidAxbUnBindSend" resultType="com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar">
+        select * from t_order_private_car where (state in (8, 9) and telX != '' and telX is not null and (UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(endServiceTime)) > 1800) or (state = 10 and telX != '' and telX is not null)
     </select>
 
 
-    <select id="queryByState" resultType="OrderPrivateCar">
-        select
-        id as id,
-        `type` as `type`,
-        userId as userId,
-        serverCarModelId as serverCarModelId,
-        driverId as driverId,
-        carId as carId,
-        orderNum as orderNum,
-        placementLon as placementLon,
-        placementLat as placementLat,
-        placementAddress as placementAddress,
-        startLon as startLon,
-        startLat as startLat,
-        startAddress as startAddress,
-        endLon as endLon,
-        endLat as endLat,
-        endAddress as endAddress,
-        boardingLon as boardingLon,
-        boardingLat as boardingLat,
-        boardingAddress as boardingAddress,
-        boardingTime as boardingTime,
-        getoffLon as getoffLon,
-        getoffLat as getoffLat,
-        getoffAddress as getoffAddress,
-        getoffTime as getoffTime,
-        mileage as mileage,
-        payManner as payManner,
-        payType as payType,
-        orderMoney as orderMoney,
-        startMileage as startMileage,
-        startMoney as startMoney,
-        mileageKilometers as mileageKilometers,
-        mileageMoney as mileageMoney,
-        duration as duration,
-        durationMoney as durationMoney,
-        wait as wait,
-        waitMoney as waitMoney,
-        longDistance as longDistance,
-        longDistanceMoney as longDistanceMoney,
-        parkMoney as parkMoney,
-        roadTollMoney as roadTollMoney,
-        redPacketMoney as redPacketMoney,
-        couponMoney as couponMoney,
-        redPacketId as redPacketId,
-        couponId as couponId,
-        discount as discount,
-        discountMoney as discountMoney,
-        activityId as activityId,
-        companyId as companyId,
-        payMoney as payMoney,
-        substitute as substitute,
-        passengers as passengers,
-        passengersPhone as passengersPhone,
-        state as state,
-        insertTime as insertTime,
-        travelTime as travelTime,
-        snatchOrderTime as snatchOrderTime,
-        setOutTime as setOutTime,
-        arriveTime as arriveTime,
-        startServiceTime as startServiceTime,
-        endServiceTime as endServiceTime,
-        orderType as orderType,
-        orderSource as orderSource,
-        invoiceId as invoiceId,
-        isReassign as isReassign,
-        reassignNotice as reassignNotice,
-        trackId as trackId,
-        isDelete as isDelete,
-        oldState as oldState,
-        telX as telX,
-        bindId as bindId
-        from t_order_private_car where isDelete = 1 and userId = #{uid}
+    <select id="queryByState" resultType="com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar">
+        select * from t_order_private_car where isDelete = 1 and userId = #{uid}
         <if test="null != orderType">
             and orderType = #{orderType}
         </if>
@@ -426,63 +269,8 @@
     </select>
 
 
-    <select id="query" resultType="OrderPrivateCar">
-        select
-        id as id,
-        userId as userId,
-        driverId as driverId,
-        carId as carId,
-        orderNum as orderNum,
-        placementLon as placementLon,
-        placementLat as placementLat,
-        placementAddress as placementAddress,
-        startLon as startLon,
-        startLat as startLat,
-        startAddress as startAddress,
-        endLon as endLon,
-        endLat as endLat,
-        endAddress as endAddress,
-        boardingLon as boardingLon,
-        boardingLat as boardingLat,
-        boardingAddress as boardingAddress,
-        boardingTime as boardingTime,
-        getoffLon as getoffLon,
-        getoffLat as getoffLat,
-        getoffAddress as getoffAddress,
-        getoffTime as getoffTime,
-        mileage as mileage,
-        payManner as payManner,
-        payType as payType,
-        orderMoney as orderMoney,
-        parkMoney as parkMoney,
-        roadTollMoney as roadTollMoney,
-        redPacketMoney as redPacketMoney,
-        couponMoney as couponMoney,
-        redPacketId as redPacketId,
-        couponId as couponId,
-        discount as discount,
-        discountMoney as discountMoney,
-        activityId as activityId,
-        companyId as companyId,
-        payMoney as payMoney,
-        substitute as substitute,
-        passengers as passengers,
-        passengersPhone as passengersPhone,
-        state as state,
-        insertTime as insertTime,
-        travelTime as travelTime,
-        snatchOrderTime as snatchOrderTime,
-        setOutTime as setOutTime,
-        arriveTime as arriveTime,
-        startServiceTime as startServiceTime,
-        endServiceTime as endServiceTime,
-        orderType as orderType,
-        orderSource as orderSource,
-        invoiceId as invoiceId,
-        isReassign as isReassign,
-        trackId as trackId,
-        orderType as reservation
-        from t_order_private_car where 1 = 1
+    <select id="query" resultType="com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar">
+        select * from t_order_private_car where 1 = 1
         <if test="null != state">
             and state in
             <foreach collection="state" item="item" index="index" open="(" separator="," close=")">

--
Gitblit v1.7.1