yanghb
2023-04-21 75a2623173bcc4a235aa1f99f7ef28519186160b
UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/dao/mapping/OrderCrossCityMapper.xml
@@ -32,7 +32,6 @@
        <result column="mileage" property="mileage"/>
        <result column="payManner" property="payManner"/>
        <result column="payType" property="payType"/>
        <result column="holidayFee" property="holidayFee"/>
        <result column="orderMoney" property="orderMoney"/>
        <result column="redPacketMoney" property="redPacketMoney"/>
        <result column="couponMoney" property="couponMoney"/>
@@ -44,11 +43,7 @@
        <result column="seatNumber" property="seatNumber" />
        <result column="activityId" property="activityId"/>
        <result column="companyId" property="companyId"/>
        <result column="taxiCardId" property="taxiCardId"/>
        <result column="userTaxiCardId" property="userTaxiCardId"/>
        <result column="discountAmount" property="discountAmount"/>
        <result column="payMoney" property="payMoney"/>
        <result column="thankYouFee" property="thankYouFee"/>
        <result column="passengers" property="passengers"/>
        <result column="passengersPhone" property="passengersPhone"/>
        <result column="sort" property="sort"/>
@@ -346,9 +341,7 @@
      h.money as cancelMoney,
      h.reason as cancelReason,
      h.remark as cancelRemark,
      CONCAT(j.startTime, '-', j.endTime) as lineShiftTime,
      a.holidayFee,
      a.discountAmount as taxiCardMoney
      CONCAT(j.startTime, '-', j.endTime) as lineShiftTime
        from t_order_cross_city a
      left join t_driver b on (a.driverId = b.id)
      left join t_car c on (a.carId = c.id)
@@ -375,8 +368,7 @@
        state as state,
        oldState as oldState,
        remark as remark,
        peopleNumber as num,
        thankYouFee
        peopleNumber as num
        from t_order_cross_city where userId = #{uid} order by insertTime desc limit #{pageNum}, #{size}
    </select>
@@ -395,7 +387,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,
@@ -406,22 +398,16 @@
        (3) as orderType
        from t_order_cross_city 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}