yanghb
2023-04-21 e52227b01983146f2e3c81dc575141d8b9889497
DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml
@@ -13,8 +13,6 @@
        <result column="cargoType" property="cargoType"/>
        <result column="urgent" property="urgent"/>
        <result column="cargoNumber" property="cargoNumber"/>
        <result column="userImg" property="userImg"/>
        <result column="driverImg" property="driverImg"/>
        <result column="remark" property="remark"/>
        <result column="placementLon" property="placementLon"/>
        <result column="placementLat" property="placementLat"/>
@@ -50,7 +48,6 @@
        <result column="activityId" property="activityId"/>
        <result column="companyId" property="companyId"/>
        <result column="payMoney" property="payMoney"/>
        <result column="thankYouFee" property="thankYouFee"/>
        <result column="state" property="state"/>
        <result column="insertTime" property="insertTime"/>
        <result column="travelTime" property="travelTime"/>
@@ -95,10 +92,7 @@
        a.tipMoney as tipMoney,
        a.remark as remark,
        a.cargoType as cargoType,
        a.isReassign as isReassign,
        a.userImg,
        a.driverImg,
        DATE_FORMAT(a.arriveTimeExpect, '%Y年%m月%d日 %H:%i') as arriveTimeExpect
        a.isReassign as isReassign
        from t_order_logistics a
        left join t_user b on (a.userId = b.id)
        where a.id = #{orderId}
@@ -112,7 +106,6 @@
        a.driverId as driverId,
        a.state as orderState,
        DATE_FORMAT(a.travelTime, '%m月%d日 %H:%i') as travelTime_,
        IF(a.endServiceTime != null,DATE_FORMAT(a.endServiceTime, '%m月%d日 %H:%i'),'') as endServiceTime,
        DATE_FORMAT(a.travelTime, '%Y-%m-%d %H:%i:%s') as travelTime,
        DATE_FORMAT(a.arriveTime, '%Y-%m-%d %H:%i:%s') as arriveTime,
        a.startAddress as startAddress,
@@ -123,10 +116,8 @@
        a.endLat as endLat,
        a.orderMoney as orderMoney,
        a.payManner as payManner,
        a.thankYouFee,
        a.trackId as trackId,
      b.nickName as userName,
      b.phone as userPhone,
        a.recipient as nickName,
        a.recipientPhone as phone,
      a.urgent as urgent,
@@ -142,11 +133,7 @@
        c.remark as cancelRemark,
        c.money as cancelPayMoney,
        if(c.userType = 1, '用户取消', '平台取消') as cancelUser,
        (select isSpecialCar from t_sys_reformist where companyId = a.companyId) as reassign,
        a.userImg,
        a.driverImg,
        a.timeOutMoney,
        DATE_FORMAT(a.arriveTimeExpect, '%m月%d日 %H:%i') as arriveTimeExpect
        (select isSpecialCar from t_sys_reformist where companyId = a.companyId) as reassign
        from t_order_logistics 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 = a.type and c.state = 2)
@@ -163,13 +150,10 @@
        startAddress as startAddress,
        endAddress as endAddress,
        state as state,
        CONCAT(recipient, '-', if(null != telX, telX, recipientPhone)) as `user`,
        CONCAT(recipient, '-', recipientPhone) as `user`,
        CONCAT(if(cargoType = 1, '普通货物 x ', '贵重货物 x '), cargoNumber) as cargoNumber,
        driverId as driverId,
        tipMoney as redMoney,
        userImg,
        driverImg,
        DATE_FORMAT(arriveTimeExpect, '%Y年%m月%d日 %H:%i') as arriveTimeExpect
        tipMoney as redMoney
        from t_order_logistics where 1 = 1
        <if test="null != driverId">
            and driverId = #{driverId}
@@ -194,12 +178,7 @@
        payManner as payManner,
        UNIX_TIMESTAMP(travelTime) as travelTime,
        remark as remark,
        tipMoney as redMoney,
        userImg,
        driverImg,
        DATE_FORMAT(arriveTimeExpect, '%Y年%m月%d日 %H:%i') as arriveTimeExpect,
        DATE_FORMAT(arriveTimeExpect, '%Y-%m-%d %H:%i:%s') as arriveTimeExpects,
        DATE_FORMAT(endServiceTime, '%Y-%m-%d %H:%i:%s') as endServiceTime
        tipMoney as redMoney
        from t_order_logistics where driverId = #{uid}
        <if test="state == 1">
            and state not in (1, 7)
@@ -330,10 +309,5 @@
        isReassign as isReassign,
        trackId as trackId
        from t_order_logistics where state = 2 and (UNIX_TIMESTAMP(travelTime) - UNIX_TIMESTAMP(now())) between 1710 and 1800
    </select>
    <select id="taskMidAxbUnBindSend" resultType="OrderLogistics">
        select * from t_order_logistics where (state in (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>
</mapper>