From 9b6f1e38dcd4f26fe6f05b86a27c8d7a779acb97 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 7 Nov 2018 17:56:28 +0800 Subject: [PATCH] fix mapper client_rates&&orderAnalysis --- .../analysis/mappers/ClientRatesAnalysisMapper.xml | 11 +++++------ .../analysis/mappers/OrderAnalysisMapper.xml | 8 +++----- src/main/ui/manage.html | 4 ++-- src/main/ui/static/menu/templates/main_menu.html | 14 ++------------ 4 files changed, 12 insertions(+), 25 deletions(-) diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientRatesAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientRatesAnalysisMapper.xml index 6c4a23d6d..140c8d33e 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientRatesAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientRatesAnalysisMapper.xml @@ -30,13 +30,12 @@ INNER JOIN ( SELECT c.client_id, - count(o.order_id) orders + SUM(o.orders) orders FROM sys_clients c - LEFT JOIN pmt_orders o - ON o.client_id = c.client_id AND o.status > 4 - AND date(o.create_time) <= date(#{end}) - AND date(o.create_time) >= date(#{begin}) - and o.total_amount>10 + LEFT JOIN statistics_customer_order o + ON o.client_id = c.client_id AND o.total > 10 + AND date(o.date) <= date(#{end}) + AND date(o.date) >= date(#{begin}) WHERE c.approve_result=1 and c.is_valid=1 GROUP BY c.client_id ) c ON c.client_id = r.client_id diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml index 6c3265277..650a06208 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml @@ -197,10 +197,9 @@