无关风月
2024-07-26 79d97c39f1d118824f91467feb9f4a55717fd0c0
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">
@@ -254,7 +235,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 +248,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 +270,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=")">