<?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.crossCity.dao.OrderCrossCityMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.crossCity.model.OrderCrossCity">
|
<id column="id" property="id"/>
|
<result column="userId" property="userId"/>
|
<result column="serverCarModelId" property="serverCarModelId"/>
|
<result column="driverId" property="driverId"/>
|
<result column="lineId" property="lineId"/>
|
<result column="lineShiftDriverId" property="lineShiftDriverId"/>
|
<result column="carId" property="carId"/>
|
<result column="orderNum" property="orderNum"/>
|
<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="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="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="peopleNumber" property="peopleNumber"/>
|
<result column="seatNumber" property="seatNumber" />
|
<result column="activityId" property="activityId"/>
|
<result column="companyId" property="companyId"/>
|
<result column="payMoney" property="payMoney"/>
|
<result column="passengers" property="passengers"/>
|
<result column="passengersPhone" property="passengersPhone"/>
|
<result column="sort" property="sort"/>
|
<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="travelMode" property="travelMode"/>
|
<result column="orderSource" property="orderSource"/>
|
<result column="isReassign" property="isReassign"/>
|
<result column="reassignNotice" property="reassignNotice"/>
|
<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="remark" property="remark"/>
|
</resultMap>
|
|
|
<select id="queryPushOrder" resultType="map">
|
select
|
a.id as orderId,
|
a.state as orderState,
|
('直通车订单') as orderName,
|
CONCAT(DATE_FORMAT(a.travelTime, '%m月%d日'), ' ', c.startTime) as travelTime,
|
a.startAddress as startAddress,
|
a.endAddress as endAddress,
|
a.startLon as startLon,
|
a.startLat as startLat,
|
a.endLon as endLon,
|
a.endLat as endLat,
|
a.isReassign as isReassign,
|
a.orderSource as orderSource,
|
a.companyId as companyId,
|
a.peopleNumber as peopleNumber,
|
a.remark as remark
|
from t_order_cross_city a
|
left join t_line_shift_driver b on (a.lineShiftDriverId = b.id)
|
left join t_line_shift c on (b.lineShiftId = c.id)
|
where a.id = #{orderId}
|
</select>
|
|
|
|
<select id="queryOrderList" resultType="map">
|
<if test="state == 1">
|
select
|
a.id as id,
|
(3) as type,
|
('直通车订单') as `name`,
|
CONCAT(DATE_FORMAT(a.travelTime, '%Y-%m-%d'), ' ', c.startTime) as time,
|
a.startAddress as startAddress,
|
a.endAddress as endAddress,
|
a.state as state,
|
a.driverId as driverId,
|
a.peopleNumber as peopleNumber,
|
(select nickName from t_user where id = a.userId)as `user`,
|
a.remark as remark
|
from t_order_cross_city a
|
left join t_line_shift_driver b on (a.lineShiftDriverId = b.id)
|
left join t_line_shift c on (b.lineShiftId = c.id)
|
where 1 = 1
|
<if test="null != driverId">
|
and a.driverId = #{driverId}
|
</if>
|
and a.state = 2 and (UNIX_TIMESTAMP(a.travelTime) - UNIX_TIMESTAMP(now())) < 1800
|
|
UNION ALL
|
|
select
|
a.id as id,
|
(3) as type,
|
('直通车订单') as `name`,
|
CONCAT(DATE_FORMAT(a.travelTime, '%Y-%m-%d'), ' ', c.startTime) as time,
|
a.startAddress as startAddress,
|
a.endAddress as endAddress,
|
a.state as state,
|
a.driverId as driverId,
|
a.peopleNumber as peopleNumber,
|
(select nickName from t_user where id = a.userId)as `user`,
|
a.remark as remark
|
from t_order_cross_city a
|
left join t_line_shift_driver b on (a.lineShiftDriverId = b.id)
|
left join t_line_shift c on (b.lineShiftId = c.id)
|
where 1 = 1
|
<if test="null != driverId">
|
and a.driverId = #{driverId}
|
</if>
|
and a.state in (3, 4, 5, 6, 11)
|
</if>
|
<if test="state == 2">
|
select
|
a.id as id,
|
(3) as type,
|
('直通车行订单') as `name`,
|
CONCAT(DATE_FORMAT(a.travelTime, '%Y-%m-%d'), ' ', c.startTime) as time,
|
a.startAddress as startAddress,
|
a.endAddress as endAddress,
|
a.state as state,
|
a.driverId as driverId,
|
a.peopleNumber as peopleNumber,
|
(select nickName from t_user where id = a.userId)as `user`,
|
a.remark as remark
|
from t_order_cross_city a
|
left join t_line_shift_driver b on (a.lineShiftDriverId = b.id)
|
left join t_line_shift c on (b.lineShiftId = c.id)
|
where 1 = 1
|
<if test="null != driverId">
|
and a.driverId = #{driverId}
|
</if>
|
and a.state = 2 and (UNIX_TIMESTAMP(a.travelTime) - UNIX_TIMESTAMP(now())) >= 1800
|
</if>
|
</select>
|
|
|
|
<select id="queryMyAllOrder" resultType="map">
|
select
|
a.id as id,
|
(3) as type,
|
('直通车订单') as `name`,
|
CONCAT(DATE_FORMAT(a.travelTime, '%Y-%m-%d'), ' ', c.startTime) as time,
|
a.startAddress as startAddress,
|
a.endAddress as endAddress,
|
a.state as state,
|
a.orderMoney as orderMoney,
|
a.peopleNumber as peopleNumber,
|
UNIX_TIMESTAMP(a.travelTime) as travelTime,
|
a.remark as remark
|
from t_order_cross_city a
|
left join t_line_shift_driver b on (a.lineShiftDriverId = b.id)
|
left join t_line_shift c on (b.lineShiftId = c.id)
|
where a.driverId = #{driverId}
|
<if test="state == 1">
|
and a.state != 1
|
</if>
|
<if test="state == 2">
|
and a.state = 7
|
</if>
|
<if test="state == 3">
|
and a.state = 10
|
</if>
|
<if test="state == 4">
|
and a.state in (6, 8, 9)
|
</if>
|
order by a.insertTime desc
|
</select>
|
|
|
|
<select id="queryOrderInfo" resultType="map">
|
select
|
a.id as orderId,
|
a.companyId as companyId,
|
a.userId as userId,
|
a.driverId as driverId,
|
a.state as orderState,
|
CONCAT(DATE_FORMAT(a.travelTime, '%m月%d日'), ' ', d.startTime) as travelTime_,
|
CONCAT(DATE_FORMAT(a.travelTime, '%Y-%m-%d'), ' ', d.startTime) as travelTime,
|
DATE_FORMAT(a.arriveTime, '%Y-%m-%d %H:%i:%s') as arriveTime,
|
a.startAddress as startAddress,
|
a.endAddress as endAddress,
|
a.startLon as startLon,
|
a.startLat as startLat,
|
a.endLon as endLon,
|
a.endLat as endLat,
|
a.trackId as trackId,
|
b.nickName as nickName,
|
a.passengersPhone as phone,
|
a.telX as telX,
|
a.bindId as bindId,
|
a.peopleNumber as peopleNumber,
|
a.payMoney as payMoney,
|
a.payManner as payManner,
|
a.seatNumber as seatNumber
|
from t_order_cross_city a
|
left join t_user b on (a.userId = b.id)
|
left join t_line_shift_driver c on (a.lineShiftDriverId = c.id)
|
left join t_line_shift d on (c.lineShiftId = d.id)
|
where a.orderNum = #{orderNum} and a.state in (2, 3, 4, 5, 6, 8, 9, 11) order by a.sort
|
</select>
|
|
|
|
<select id="queryOrderCrossCityInfo" resultType="map">
|
select
|
a.id as orderId,
|
a.userId as userId,
|
a.driverId as driverId,
|
a.state as orderState,
|
a.travelTime as travelTime,
|
CONCAT(DATE_FORMAT(a.travelTime, '%m月%d日'), ' ', d.startTime) as travelTime_,
|
CONCAT(DATE_FORMAT(a.arriveTime, '%Y-%m-%d'), ' ', d.startTime) as arriveTime,
|
a.startAddress as startAddress,
|
a.endAddress as endAddress,
|
a.startLon as startLon,
|
a.startLat as startLat,
|
a.endLon as endLon,
|
a.endLat as endLat,
|
a.trackId as trackId,
|
b.nickName as nickName,
|
a.passengersPhone as phone,
|
a.telX as telX,
|
a.bindId as bindId,
|
a.peopleNumber as peopleNumber,
|
a.payMoney as payMoney,
|
a.payManner as payManner,
|
a.seatNumber as seatNumber,
|
(select phone from t_phone where companyId = a.companyId and `type` = 1) as emergencyCall
|
from t_order_cross_city a
|
left join t_user b on (a.userId = b.id)
|
left join t_line_shift_driver c on (a.lineShiftDriverId = c.id)
|
left join t_line_shift d on (c.lineShiftId = d.id)
|
where a.id = #{orderId}
|
</select>
|
|
|
<select id="queryWithin30Minutes" resultType="OrderCrossCity">
|
select
|
id as id,
|
userId as userId,
|
serverCarModelId as serverCarModelId,
|
driverId as driverId,
|
lineId as lineId,
|
lineShiftDriverId as lineShiftDriverId,
|
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,
|
redPacketMoney as redPacketMoney,
|
couponMoney as couponMoney,
|
redPacketId as redPacketId,
|
couponId as couponId,
|
discount as discount,
|
discountMoney as discountMoney,
|
peopleNumber as peopleNumber,
|
seatNumber as seatNumber,
|
activityId as activityId,
|
companyId as companyId,
|
payMoney as payMoney,
|
passengers as passengers,
|
passengersPhone as passengersPhone,
|
sort as sort,
|
state as state,
|
insertTime as insertTime,
|
travelTime as travelTime,
|
snatchOrderTime as snatchOrderTime,
|
setOutTime as setOutTime,
|
arriveTime as arriveTime,
|
startServiceTime as startServiceTime,
|
endServiceTime as endServiceTime,
|
travelMode as travelMode,
|
orderSource as orderSource,
|
isReassign as isReassign,
|
reassignNotice as reassignNotice,
|
invoiceId as invoiceId,
|
trackId as trackId,
|
isDelete as isDelete,
|
oldState as oldState,
|
telX as telX,
|
bindId as bindId
|
from t_order_cross_city where isDelete = 1 and (UNIX_TIMESTAMP(travelTime) - UNIX_TIMESTAMP(now())) < 1800
|
<if test="null != driverId">
|
and driverId = #{driverId}
|
</if>
|
<if test="null != state">
|
and state in
|
<foreach collection="state" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
</select>
|
|
|
|
<select id="queryByDriverId" resultType="OrderCrossCity">
|
select
|
id as id,
|
userId as userId,
|
serverCarModelId as serverCarModelId,
|
driverId as driverId,
|
lineId as lineId,
|
lineShiftDriverId as lineShiftDriverId,
|
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,
|
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,
|
passengers as passengers,
|
passengersPhone as passengersPhone,
|
peopleNumber as peopleNumber,
|
seatNumber as seatNumber,
|
sort as sort,
|
state as state,
|
insertTime as insertTime,
|
travelTime as travelTime,
|
snatchOrderTime as snatchOrderTime,
|
setOutTime as setOutTime,
|
arriveTime as arriveTime,
|
startServiceTime as startServiceTime,
|
endServiceTime as endServiceTime,
|
travelMode as travelMode,
|
orderSource as orderSource,
|
isReassign as isReassign,
|
reassignNotice as reassignNotice,
|
invoiceId as invoiceId,
|
trackId as trackId,
|
isDelete as isDelete,
|
oldState as oldState,
|
telX as telX,
|
bindId as bindId
|
from t_order_cross_city where isDelete = 1
|
<if test="null != driverId">
|
and driverId = #{driverId}
|
</if>
|
<if test="null != state">
|
and state in
|
<foreach collection="state" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
</select>
|
|
|
<select id="query" resultType="OrderCrossCity">
|
select
|
id as id,
|
userId as userId,
|
serverCarModelId as serverCarModelId,
|
driverId as driverId,
|
lineId as lineId,
|
lineShiftDriverId as lineShiftDriverId,
|
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,
|
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,
|
passengers as passengers,
|
passengersPhone as passengersPhone,
|
peopleNumber as peopleNumber,
|
seatNumber as seatNumber,
|
sort as sort,
|
state as state,
|
insertTime as insertTime,
|
travelTime as travelTime,
|
snatchOrderTime as snatchOrderTime,
|
setOutTime as setOutTime,
|
arriveTime as arriveTime,
|
startServiceTime as startServiceTime,
|
endServiceTime as endServiceTime,
|
travelMode as travelMode,
|
orderSource as orderSource,
|
isReassign as isReassign,
|
reassignNotice as reassignNotice,
|
invoiceId as invoiceId,
|
trackId as trackId,
|
isDelete as isDelete,
|
oldState as oldState,
|
telX as telX,
|
bindId as bindId
|
from t_order_cross_city where isDelete = 1
|
<if test="null != start and null != end">
|
and travelTime between #{start} and #{end}
|
</if>
|
</select>
|
|
|
<select id="queryOrders" resultType="OrderCrossCity">
|
select
|
id as id,
|
userId as userId,
|
serverCarModelId as serverCarModelId,
|
driverId as driverId,
|
lineId as lineId,
|
lineShiftDriverId as lineShiftDriverId,
|
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,
|
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,
|
passengers as passengers,
|
passengersPhone as passengersPhone,
|
peopleNumber as peopleNumber,
|
seatNumber as seatNumber,
|
sort as sort,
|
state as state,
|
insertTime as insertTime,
|
travelTime as travelTime,
|
snatchOrderTime as snatchOrderTime,
|
setOutTime as setOutTime,
|
arriveTime as arriveTime,
|
startServiceTime as startServiceTime,
|
endServiceTime as endServiceTime,
|
travelMode as travelMode,
|
orderSource as orderSource,
|
isReassign as isReassign,
|
reassignNotice as reassignNotice,
|
invoiceId as invoiceId,
|
trackId as trackId,
|
isDelete as isDelete,
|
oldState as oldState,
|
telX as telX,
|
bindId as bindId
|
from t_order_cross_city where isDelete = 1
|
<if test="null != driverId">
|
and driverId = #{driverId}
|
</if>
|
<if test="null != lineShiftDriverId">
|
and lineShiftDriverId = #{lineShiftDriverId}
|
</if>
|
<if test="null != state">
|
and state in
|
<foreach collection="state" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
</select>
|
|
|
<select id="queryByState" resultType="OrderCrossCity">
|
select
|
id as id,
|
userId as userId,
|
serverCarModelId as serverCarModelId,
|
driverId as driverId,
|
lineId as lineId,
|
lineShiftDriverId as lineShiftDriverId,
|
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,
|
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,
|
passengers as passengers,
|
passengersPhone as passengersPhone,
|
peopleNumber as peopleNumber,
|
seatNumber as seatNumber,
|
sort as sort,
|
state as state,
|
insertTime as insertTime,
|
travelTime as travelTime,
|
snatchOrderTime as snatchOrderTime,
|
setOutTime as setOutTime,
|
arriveTime as arriveTime,
|
startServiceTime as startServiceTime,
|
endServiceTime as endServiceTime,
|
travelMode as travelMode,
|
orderSource as orderSource,
|
isReassign as isReassign,
|
reassignNotice as reassignNotice,
|
invoiceId as invoiceId,
|
trackId as trackId,
|
isDelete as isDelete,
|
oldState as oldState,
|
telX as telX,
|
bindId as bindId,
|
remark as remark
|
from t_order_cross_city where isDelete = 1
|
<if test="null != uid">
|
and userId = #{uid}
|
</if>
|
<if test="null != state">
|
and state in
|
<foreach collection="state" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
</select>
|
|
|
<select id="queryListOrder" resultType="OrderCrossCity">
|
select
|
a.id as id,
|
a.userId as userId,
|
a.serverCarModelId as serverCarModelId,
|
a.driverId as driverId,
|
a.lineId as lineId,
|
a.lineShiftDriverId as lineShiftDriverId,
|
a.carId as carId,
|
a.orderNum as orderNum,
|
a.placementLon as placementLon,
|
a.placementLat as placementLat,
|
a.placementAddress as placementAddress,
|
a.startLon as startLon,
|
a.startLat as startLat,
|
a.startAddress as startAddress,
|
a.endLon as endLon,
|
a.endLat as endLat,
|
a.endAddress as endAddress,
|
a.boardingLon as boardingLon,
|
a.boardingLat as boardingLat,
|
a.boardingAddress as boardingAddress,
|
a.boardingTime as boardingTime,
|
a.getoffLon as getoffLon,
|
a.getoffLat as getoffLat,
|
a.getoffAddress as getoffAddress,
|
a.getoffTime as getoffTime,
|
a.mileage as mileage,
|
a.payManner as payManner,
|
a.payType as payType,
|
a.orderMoney as orderMoney,
|
a.redPacketMoney as redPacketMoney,
|
a.couponMoney as couponMoney,
|
a.redPacketId as redPacketId,
|
a.couponId as couponId,
|
a.discount as discount,
|
a.discountMoney as discountMoney,
|
a.activityId as activityId,
|
a.companyId as companyId,
|
a.payMoney as payMoney,
|
a.passengers as passengers,
|
a.passengersPhone as passengersPhone,
|
a.peopleNumber as peopleNumber,
|
a.seatNumber as seatNumber,
|
a.sort as sort,
|
a.state as state,
|
a.insertTime as insertTime,
|
a.travelTime as travelTime,
|
a.snatchOrderTime as snatchOrderTime,
|
a.setOutTime as setOutTime,
|
a.arriveTime as arriveTime,
|
a.startServiceTime as startServiceTime,
|
a.endServiceTime as endServiceTime,
|
a.travelMode as travelMode,
|
a.orderSource as orderSource,
|
a.isReassign as isReassign,
|
a.reassignNotice as reassignNotice,
|
a.invoiceId as invoiceId,
|
a.trackId as trackId,
|
a.isDelete as isDelete,
|
a.oldState as oldState,
|
a.telX as telX,
|
a.bindId as bindId,
|
a.remark as remark
|
from t_order_cross_city a
|
left join t_line_shift_driver b on (a.lineShiftDriverId = b.id)
|
where a.isDelete = 1
|
<if test="null != driverId">
|
and a.driverId = #{driverId}
|
</if>
|
<if test="null != lineShiftId">
|
and b.lineShiftId = #{lineShiftId}
|
</if>
|
<if test="null != state">
|
and a.state in
|
<foreach collection="state" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
<if test="null != day and '' != day">
|
and DATE_FORMAT(a.travelTime, '%Y-%m-%d') = #{day}
|
</if>
|
</select>
|
|
|
|
<select id="queryMaturity" resultType="OrderCrossCity">
|
select
|
id as id,
|
userId as userId,
|
serverCarModelId as serverCarModelId,
|
driverId as driverId,
|
lineId as lineId,
|
lineShiftDriverId as lineShiftDriverId,
|
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,
|
redPacketMoney as redPacketMoney,
|
couponMoney as couponMoney,
|
redPacketId as redPacketId,
|
couponId as couponId,
|
discount as discount,
|
discountMoney as discountMoney,
|
peopleNumber as peopleNumber,
|
seatNumber as seatNumber,
|
activityId as activityId,
|
companyId as companyId,
|
payMoney as payMoney,
|
passengers as passengers,
|
passengersPhone as passengersPhone,
|
sort as sort,
|
state as state,
|
insertTime as insertTime,
|
travelTime as travelTime,
|
snatchOrderTime as snatchOrderTime,
|
setOutTime as setOutTime,
|
arriveTime as arriveTime,
|
startServiceTime as startServiceTime,
|
endServiceTime as endServiceTime,
|
travelMode as travelMode,
|
orderSource as orderSource,
|
isReassign as isReassign,
|
reassignNotice as reassignNotice,
|
invoiceId as invoiceId,
|
trackId as trackId,
|
isDelete as isDelete,
|
oldState as oldState,
|
telX as telX,
|
bindId as bindId
|
from t_order_cross_city where state = 2 and (UNIX_TIMESTAMP(travelTime) - UNIX_TIMESTAMP(now())) between 1710 and 1800
|
</select>
|
</mapper>
|