| | |
| | | startAddress as startAddress, |
| | | endAddress as endAddress, |
| | | driverId as driverId, |
| | | (1) as orderType, |
| | | (7) as orderType, |
| | | state as state, |
| | | oldState as oldState |
| | | from t_order_transfer where userId = #{uid} order by insertTime desc limit #{pageNum}, #{size} |
| | |
| | | (select count(id) from t_order_cross_city where driverId = a.driverId and state in (6, 8, 9)) |
| | | ) as orderNum, |
| | | b.phone as driverPhone, |
| | | if(a.state = 12, (select money from t_order_cancel where orderId = a.id and orderType = 1 and state = 1 order by insertTime desc limit 0, 1), if(a.state = 10, (select money from t_order_cancel where orderId = a.id and orderType = 1 and state = 2 order by insertTime desc limit 0, 1), 0)) as cancelPayMoney, |
| | | if(a.state = 12, (select money from t_order_cancel where orderId = a.id and orderType = 7 and state = 1 order by insertTime desc limit 0, 1), if(a.state = 10, (select money from t_order_cancel where orderId = a.id and orderType = 7 and state = 2 order by insertTime desc limit 0, 1), 0)) as cancelPayMoney, |
| | | if(a.state = 12, (select id from t_order_cancel where orderId = a.id and orderType = 1 and state = 1 order by insertTime desc limit 0, 1), 0) as cancelId, |
| | | g.fraction as orderScore, |
| | | g.content as evaluate, |
| | |
| | | left join t_car c on (a.carId = c.id) |
| | | left join t_car_model d on (c.carModelId = d.id) |
| | | left join t_car_brand f on (d.brandId = f.id) |
| | | left join t_order_evaluate g on (a.id = g.orderId and g.orderType = 1) |
| | | left join t_order_cancel h on (a.id = h.orderId and h.orderType = 1 and h.state = 2) |
| | | left join t_order_evaluate g on (a.id = g.orderId and g.orderType = 7) |
| | | left join t_order_cancel h on (a.id = h.orderId and h.orderType = 7 and h.state = 2) |
| | | where a.id = #{orderId} |
| | | </select> |
| | | |