diff --git a/njzscloud-svr/src/main/resources/mapper/StatisticsMapper.xml b/njzscloud-svr/src/main/resources/mapper/StatisticsMapper.xml index e939e3a..2241ca5 100644 --- a/njzscloud-svr/src/main/resources/mapper/StatisticsMapper.xml +++ b/njzscloud-svr/src/main/resources/mapper/StatisticsMapper.xml @@ -142,7 +142,7 @@ SELECT MAX(IF(order_status = '已完成', order_count, 0)) completed, MAX(IF(order_status = '已取消', order_count, 0)) cancelled, MAX(IF(order_status = '已预约', order_count, 0)) waiting, - MAX(IF(order_status = '已完成', order_count, 0)) + MAX(IF(order_status = '已取消', order_count, 0)) + MAX(IF(order_status = '已预约', order_count, 0)) total + MAX(IF(order_status = '已完成', order_count, 0)) + MAX(IF(order_status = '已取消', order_count, 0)) + MAX(IF(order_status = '已预约', order_count, 0)) + MAX(IF(order_status = '待看料', order_count, 0)) + MAX(IF(order_status = '待出场', order_count, 0)) total FROM (SELECT order_status, COUNT(*) order_count FROM (SELECT IF(a.status = 1, '已完成', IF(a.status = 4, '已取消', IF(a.car_status = 0, '已预约', IF(a.car_status = 1 AND a.admin_status = 0, '待看料', '待出场')))) order_status FROM ba_order a