yanghb
2023-04-21 75a2623173bcc4a235aa1f99f7ef28519186160b
UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/dao/mapping/OrderTaxiMapper.xml
@@ -37,7 +37,6 @@
        <result column="parkMoney" property="parkMoney"/>
        <result column="roadTollMoney" property="roadTollMoney"/>
        <result column="tipMoney" property="tipMoney"/>
        <result column="holidayFee" property="holidayFee"/>
        <result column="redPacketMoney" property="redPacketMoney"/>
        <result column="couponMoney" property="couponMoney"/>
        <result column="redPacketId" property="redPacketId"/>
@@ -45,12 +44,8 @@
        <result column="discount" property="discount"/>
        <result column="discountMoney" property="discountMoney"/>
        <result column="activityId" property="activityId"/>
        <result column="taxiCardId" property="taxiCardId"/>
        <result column="userTaxiCardId" property="userTaxiCardId"/>
        <result column="discountAmount" property="discountAmount"/>
        <result column="companyId" property="companyId"/>
        <result column="payMoney" property="payMoney"/>
        <result column="thankYouFee" property="thankYouFee"/>
        <result column="substitute" property="substitute"/>
        <result column="passengers" property="passengers"/>
        <result column="passengersPhone" property="passengersPhone"/>
@@ -67,6 +62,7 @@
        <result column="invoiceId" property="invoiceId"/>
        <result column="isReassign" property="isReassign"/>
        <result column="reassignNotice" property="reassignNotice"/>
        <result column="deviceCode" property="deviceCode"/>
        <result column="trackId" property="trackId"/>
        <result column="isDelete" property="isDelete"/>
        <result column="oldState" property="oldState"/>
@@ -146,8 +142,7 @@
        driverId as driverId,
        (2) as orderType,
        state as state,
        oldState as oldState,
        thankYouFee
        oldState as oldState
        from t_order_taxi where userId = #{uid} order by insertTime desc limit #{pageNum}, #{size}
    </select>
@@ -175,7 +170,7 @@
    <select id="queryInvoiceOrder" resultType="map">
        select
        id as orderId,
        id as id,
        DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i') as time,
        startAddress as startAddress,
        endAddress as endAddress,
@@ -186,22 +181,16 @@
        (2) as orderType
        from t_order_taxi where state in (8, 9)
        <if test="type == 1">
            and (invoiceId is null or invoiceId in (select id from t_invoice where state = 3))
            and invoiceId is null and invoiceId in (select id from t_invoice where state != 2)
        </if>
        <if test="type == 2">
            and invoiceId in (select id from t_invoice where state = 2)
        </if>
        <if test="null != startTime">
            and travelTime >= #{startTime}
        <if test="null != startTime and null != endTime">
            and travelTime between #{startTime} and #{endTime}
        </if>
        <if test="null != startMoney">
            and payMoney >= #{startMoney}
        </if>
        <if test="null != endTime">
            and  #{endTime}>= travelTime
        </if>
        <if test="null != endMoney">
            and   #{endMoney}>=payMoney
        <if test="null != startMoney and null != endMoney">
            and payMoney between #{startMoney} and #{endMoney}
        </if>
        <if test="null !=uid">
            and userId = #{uid}
@@ -256,9 +245,7 @@
      h.userType as cancelUserType,
      h.money as cancelMoney,
      h.reason as cancelReason,
      h.remark as cancelRemark,
      a.holidayFee,
      a.discountAmount as taxiCardMoney
      h.remark as cancelRemark
        from t_order_taxi a
      left join t_driver b on (a.driverId = b.id)
      left join t_car c on (a.carId = c.id)