huliguo
2025-07-31 7b1772169b274e87fe441923f0dbf5e25ee30a72
pt-errand/src/main/resources/mapper/OrderMapper.xml
@@ -243,10 +243,18 @@
            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
@@ -398,10 +406,17 @@
        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