| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.smallLogistics.dao.OrderLogisticsMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics"> |
| | | <id column="id" property="id"/> |
| | | <result column="type" property="type"/> |
| | | <result column="userId" property="userId"/> |
| | | <result column="driverId" property="driverId"/> |
| | | <result column="carId" property="carId"/> |
| | | <result column="orderNum" property="orderNum"/> |
| | | <result column="cargoType" property="cargoType"/> |
| | | <result column="urgent" property="urgent"/> |
| | | <result column="cargoNumber" property="cargoNumber"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="placementLon" property="placementLon"/> |
| | | <result column="placementLat" property="placementLat"/> |
| | | <result column="placementAddress" property="placementAddress"/> |
| | | <result column="startLon" property="startLon"/> |
| | | <result column="startLat" property="startLat"/> |
| | | <result column="startAddress" property="startAddress"/> |
| | | <result column="endLon" property="endLon"/> |
| | | <result column="endLat" property="endLat"/> |
| | | <result column="endAddress" property="endAddress"/> |
| | | <result column="recipient" property="recipient"/> |
| | | <result column="recipientPhone" property="recipientPhone"/> |
| | | <result column="boardingLon" property="boardingLon"/> |
| | | <result column="boardingLat" property="boardingLat"/> |
| | | <result column="boardingAddress" property="boardingAddress"/> |
| | | <result column="boardingTime" property="boardingTime"/> |
| | | <result column="getoffLon" property="getoffLon"/> |
| | | <result column="getoffLat" property="getoffLat"/> |
| | | <result column="getoffAddress" property="getoffAddress"/> |
| | | <result column="getoffTime" property="getoffTime"/> |
| | | <result column="mileage" property="mileage"/> |
| | | <result column="payManner" property="payManner"/> |
| | | <result column="payType" property="payType"/> |
| | | <result column="orderMoney" property="orderMoney"/> |
| | | <result column="travelMoney" property="travelMoney"/> |
| | | <result column="tipMoney" property="tipMoney"/> |
| | | <result column="redPacketMoney" property="redPacketMoney"/> |
| | | <result column="couponMoney" property="couponMoney"/> |
| | | <result column="redPacketId" property="redPacketId"/> |
| | | <result column="couponId" property="couponId"/> |
| | | <result column="discount" property="discount"/> |
| | | <result column="discountMoney" property="discountMoney"/> |
| | | <result column="activityId" property="activityId"/> |
| | | <result column="companyId" property="companyId"/> |
| | | <result column="payMoney" property="payMoney"/> |
| | | <result column="state" property="state"/> |
| | | <result column="insertTime" property="insertTime"/> |
| | | <result column="travelTime" property="travelTime"/> |
| | | <result column="snatchOrderTime" property="snatchOrderTime"/> |
| | | <result column="setOutTime" property="setOutTime"/> |
| | | <result column="arriveTime" property="arriveTime"/> |
| | | <result column="startServiceTime" property="startServiceTime"/> |
| | | <result column="endServiceTime" property="endServiceTime"/> |
| | | <result column="orderSource" property="orderSource"/> |
| | | <result column="invoiceId" property="invoiceId"/> |
| | | <result column="trackId" property="trackId"/> |
| | | <result column="isDelete" property="isDelete"/> |
| | | <result column="oldState" property="oldState"/> |
| | | <result column="telX" property="telX"/> |
| | | <result column="bindId" property="bindId"/> |
| | | <result column="pickUpCode" property="pickUpCode"/> |
| | | <result column="isReassign" property="isReassign"/> |
| | | <result column="reassignNotice" property="reassignNotice"/> |
| | | <result column="driverPay" property="driverPay"/> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | |
| | |
| | | a.urgent as urgent, |
| | | a.tipMoney as tipMoney, |
| | | a.remark as remark, |
| | | a.isReassign as isReassign |
| | | a.isReassign as isReassign, |
| | | a.tripId |
| | | from t_order_logistics a |
| | | left join t_user b on (a.userId = b.id) |
| | | where a.id = #{orderId} |
| | |
| | | a.payMoney as payMoney, |
| | | a.trackId as trackId, |
| | | b.nickName as userName, |
| | | b.phone as userPhone, |
| | | a.recipient as nickName, |
| | | a.recipientPhone as phone, |
| | | a.urgent as urgent, |
| | |
| | | c.money as cancelPayMoney, |
| | | if(c.userType = 1, '用户', '平台') as cancelUser, |
| | | (select isSpecialCar from t_sys_reformist where companyId = a.companyId) as reassign, |
| | | a.driverPay |
| | | a.driverPay, |
| | | a.isFrozen, |
| | | a.priceDifference, |
| | | a.tripId, |
| | | DATE_FORMAT(a.snatchOrderTime, '%Y-%m-%d %H:%i:%s') as snatchOrderTime |
| | | 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) |
| | |
| | | state as state, |
| | | CONCAT(recipient, '-', recipientPhone) as `user`, |
| | | CONCAT(if(#{language} = 1, if(cargoType = 1, '普通货物 x ', '贵重货物 x '), if(#{language} = 2, if(cargoType = 1, 'General cargo x ', 'Valuable cargo x '), if(cargoType = 1, 'Pour marchandises générales x ', 'Marchandises de valeur x '))), cargoNumber) as cargoNumber, |
| | | driverId as driverId |
| | | driverId as driverId, |
| | | isFrozen |
| | | from t_order_logistics where 1 = 1 |
| | | <if test="null != driverId"> |
| | | and driverId = #{driverId} |
| | |
| | | payManner as payManner, |
| | | UNIX_TIMESTAMP(travelTime) as travelTime, |
| | | remark as remark, |
| | | driverPay |
| | | driverPay, |
| | | cancelMidway |
| | | from t_order_logistics where driverId = #{uid} |
| | | <if test="state == 1"> |
| | | and state not in (1, 7) |