| | |
| | | tau.name as appUserName, |
| | | tau.phone as appUserPhone, |
| | | tc.name as courierName, |
| | | tc.phone as courierPhone |
| | | tc.phone as courierPhone, |
| | | te.rating as rating, |
| | | |
| | | CASE |
| | | WHEN o.finish_time IS NOT NULL THEN |
| | | TIMESTAMPDIFF(MINUTE, o.order_time, o.finish_time) |
| | | ELSE NULL |
| | | END as duration |
| | | from t_order o |
| | | inner join t_app_user tau on o.app_user_id = tau.id |
| | | left join t_courier tc on o.courier_id = tc.id |
| | | left join t_evaluation te on o.id = te.order_id and te.type = 1 |
| | | where |
| | | o.del_flag=0 |
| | | and o.pay_status=2 |
| | |
| | | tau.name as appUserName, |
| | | tau.phone as appUserPhone, |
| | | tc.name as courierName, |
| | | tc.phone as courierPhone |
| | | tc.phone as courierPhone, |
| | | te.rating as rating, |
| | | CASE |
| | | WHEN o.finish_time IS NOT NULL THEN |
| | | TIMESTAMPDIFF(MINUTE, o.order_time, o.finish_time) |
| | | ELSE 0 |
| | | END as duration |
| | | from t_order o |
| | | inner join t_app_user tau on o.app_user_id = tau.id |
| | | left join t_courier tc on o.courier_id = tc.id |
| | | left join t_evaluation te on o.id = te.order_id on te.type = 1 |
| | | where |
| | | o.del_flag=0 |
| | | and o.pay_status=2 |