From ab01c02606f95c060e189d9aefcd4c9d160c8bd3 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 26 Mar 2020 14:43:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=B8=A0=E9=81=93=E6=84=8F?= =?UTF-8?q?=E6=84=BF=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PayChannelController.class.php | 9 +- .../PayChannelIntentionController.class.php | 185 ++++++++++++------ .../View/PayChannelIntention/detail.html | 8 +- .../Admin/View/PayChannelIntention/index.html | 16 +- 4 files changed, 143 insertions(+), 75 deletions(-) diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index c7f5f895e..883c955d6 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -988,7 +988,7 @@ class PayChannelController extends ThinkController } if (!empty($_REQUEST['user_account'])) { - $map['user_account'] = array('like',"{$_REQUEST['user_account']}%"); + $map['tab_spend.user_account'] = array('like',"{$_REQUEST['user_account']}%"); } $map['pay_status'] = $coinMap['tab_deposit.pay_status'] = 1; $map['pay_way'] = array('egt',1); @@ -1003,7 +1003,7 @@ class PayChannelController extends ThinkController } // setPowerPromoteIds($map,'promote_id'); $data = M('spend','tab_') - ->field("pay_order_number,order_number,user_account,pay_time,game_name,server_name,game_player_name,cost,pay_amount,pay_way as pay_type,pay_way,pay_game_status,sdk_version") + ->field("pay_order_number,order_number,tab_spend.user_account,pay_time,game_name,server_name,game_player_name,cost,pay_amount,pay_way as pay_type,pay_way,pay_game_status,sdk_version") ->join('inner join tab_test_white_list on tab_spend.user_id=tab_test_white_list.user_id') ->where($map) // ->order('tab_spend.id DESC') @@ -1013,9 +1013,14 @@ class PayChannelController extends ThinkController $map['tab_deposit.user_account'] = $map['user_account']; } + $map['user_account'] = $map['tab_spend.user_account']; + unset($map['tab_spend.user_account']); $coinMap = $map; + $map['tab_spend.user_account'] = array('like',"{$_REQUEST['user_account']}%"); $coinMap['tab_deposit.pay_status'] = 1; $coinMap['tab_deposit.pay_way'] = $map['pay_way']; + $coinMap['tab_deposit.user_account'] = $coinMap['user_account']; + unset($coinMap['user_account']); unset($coinMap['pay_status']); unset($coinMap['pay_way']); diff --git a/Application/Admin/Controller/PayChannelIntentionController.class.php b/Application/Admin/Controller/PayChannelIntentionController.class.php index a72dfa3bf..992aeb8b9 100644 --- a/Application/Admin/Controller/PayChannelIntentionController.class.php +++ b/Application/Admin/Controller/PayChannelIntentionController.class.php @@ -49,17 +49,29 @@ class PayChannelIntentionController extends AdminController } if ($_REQUEST['pay_type']) { - $map['pay_ways'] = ['like',"%,{$_REQUEST['pay_type']}"]; + $map['pay_ways'] = ['like',"%{$_REQUEST['pay_type']}"]; } $show_data = M('pay_channel_intention','tab_') - ->field('group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways,tab_pay_channel_intention.user_account, - tab_pay_channel_intention.pay_amount,CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status,tab_pay_channel_intention.pay_order_number,create_time') + ->field('id,group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways,tab_pay_channel_intention.user_account, + tab_pay_channel_intention.pay_amount,CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status,tab_pay_channel_intention.pay_order_number,max(create_time) m_time') // ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number') ->group('tab_pay_channel_intention.pay_order_number') ->order('tab_pay_channel_intention.create_time DESC') ->select(false); + $show_data = M('pay_channel_intention','tab_') + ->field("a.pay_amount,pay_ways,a.user_account,a.pay_order_number,tab_pay_channel_intention.create_time,CASE WHEN is_submit = 1 THEN tab_pay_channel_intention.pay_status ELSE 2 END as pay_status") + ->join("left join ({$show_data}) as a on tab_pay_channel_intention.pay_order_number=a.pay_order_number and tab_pay_channel_intention.create_time=m_time") + ->where('pay_ways is not null') +// ->group('tab_pay_channel_intention.pay_order_number') + ->order('tab_pay_channel_intention.id DESC') + ->select(false); + + $show_data = M()->table('('.$show_data.') as a') + ->select(false); + + $data = M()->table('('.$show_data.') as a') ->field('pay_ways,user_account,pay_status, SUM(if(pay_status=0,pay_amount,0)) fail_invest_amount, @@ -72,6 +84,14 @@ class PayChannelIntentionController extends AdminController ->group('a.pay_ways,a.user_account,a.pay_status') ->select(false); +// dump($data);die(); + $count = M()->table('('.$data.') as a') + ->field('pay_ways,sum(fail_invest_amount) fail_invest_amount') + ->where($map) + ->group('a.pay_ways') + ->select(false); +// dump($count);die(); + $data = M()->table('('.$data.') as a') ->field('pay_ways,sum(fail_invest_amount) fail_invest_amount,create_time, sum(success_invest_amount) success_invest_amount, @@ -93,9 +113,23 @@ class PayChannelIntentionController extends AdminController count(if(pay_status=0,pay_amount,null)) fail_invest_count, count(if(pay_status=1,pay_amount,null)) success_invest_count, count(if(pay_status=2,pay_amount,null)) nothing_invest_count') + ->where($map) + ->group('a.pay_ways,a.user_account,a.pay_status') + ->select(false); + + $sum = M()->table('('.$sum.') as a') + ->field('pay_ways,user_account,pay_status,create_time, + SUM(if(pay_status=0,fail_invest_amount,0)) fail_invest_amount, + SUM(if(pay_status=1,success_invest_amount,0)) success_invest_amount, + SUM(if(pay_status=2,nothing_invest_amount,0)) nothing_invest_amount, + count(if(pay_status=0,fail_invest_count,null)) fail_invest_count, + count(if(pay_status=1,success_invest_count,null)) success_invest_count, + count(if(pay_status=2,nothing_invest_count,null)) nothing_invest_count') ->group('a.user_account,a.pay_status') ->select(false); +// dump($sum);die(); + $sum = M()->table('('.$sum.') as a') ->field('pay_ways,sum(fail_invest_amount) fail_invest_amount, sum(success_invest_amount) success_invest_amount, @@ -103,16 +137,13 @@ class PayChannelIntentionController extends AdminController count(if(pay_status=0,fail_invest_count,NULL)) fail_invest_count, count(if(pay_status=1,success_invest_count,NULL)) success_invest_count, count(if(pay_status=2,nothing_invest_count,NULL)) nothing_invest_count') - ->where($map) ->find(); +// dump($sum);die(); $this->assign('sum',$sum); - $count = M()->table('('.$show_data.') as a') - ->field('count(pay_amount) count') - ->group('a.pay_ways') - ->select(false); + $count = M()->table('('.$count.') as a')->count(); @@ -165,17 +196,29 @@ class PayChannelIntentionController extends AdminController } if ($_REQUEST['pay_type']) { - $map['pay_ways'] = ['like',"%,{$_REQUEST['pay_type']}"]; + $map['pay_ways'] = ['like',"%{$_REQUEST['pay_type']}"]; } $show_data = M('pay_channel_intention','tab_') - ->field('group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways,tab_pay_channel_intention.user_account, - tab_pay_channel_intention.pay_amount,CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status,tab_pay_channel_intention.pay_order_number') + ->field('id,group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways,tab_pay_channel_intention.user_account, + tab_pay_channel_intention.pay_amount,CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status,tab_pay_channel_intention.pay_order_number,max(create_time) m_time') // ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number') ->group('tab_pay_channel_intention.pay_order_number') ->order('tab_pay_channel_intention.create_time DESC') ->select(false); + $show_data = M('pay_channel_intention','tab_') + ->field("a.pay_amount,pay_ways,a.user_account,a.pay_order_number,tab_pay_channel_intention.create_time,CASE WHEN is_submit = 1 THEN tab_pay_channel_intention.pay_status ELSE 2 END as pay_status") + ->join("left join ({$show_data}) as a on tab_pay_channel_intention.pay_order_number=a.pay_order_number and tab_pay_channel_intention.create_time=m_time") + ->where('pay_ways is not null') +// ->group('tab_pay_channel_intention.pay_order_number') + ->order('tab_pay_channel_intention.id DESC') + ->select(false); + + $show_data = M()->table('('.$show_data.') as a') + ->select(false); + + $data = M()->table('('.$show_data.') as a') ->field('pay_ways,user_account,pay_status, SUM(if(pay_status=0,pay_amount,0)) fail_invest_amount, @@ -183,8 +226,8 @@ class PayChannelIntentionController extends AdminController SUM(if(pay_status=2,pay_amount,0)) nothing_invest_amount, count(if(pay_status=0,pay_amount,null)) fail_invest_count, count(if(pay_status=1,pay_amount,null)) success_invest_count, - count(if(pay_status=2,pay_amount,null)) nothing_invest_count') - ->where($map) + count(if(pay_status=2,pay_amount,null)) nothing_invest_count,create_time') +// ->where($map) ->group('a.pay_ways,a.user_account,a.pay_status') ->select(false); @@ -218,10 +261,10 @@ class PayChannelIntentionController extends AdminController ->field('"" as pay_ways_ch,"" as pay_way,pay_ways,user_account, count(if(pay_status=1,success_invest_count,NULL)) success_invest_count, sum(success_invest_amount) success_invest_amount, - count(if(pay_status=2,nothing_invest_count,NULL)) nothing_invest_count, - sum(nothing_invest_amount) nothing_invest_amount, count(if(pay_status=0,fail_invest_count,NULL)) fail_invest_count, - sum(fail_invest_amount) fail_invest_amount') + sum(fail_invest_amount) fail_invest_amount, + count(if(pay_status=2,nothing_invest_count,NULL)) nothing_invest_count, + sum(nothing_invest_amount) nothing_invest_amount') ->limit(($i-1)*$perSize ,$perSize) ->where($map) ->group('a.pay_ways') @@ -265,13 +308,24 @@ class PayChannelIntentionController extends AdminController } $sum = M()->table('('.$show_data.') as a') - ->field('pay_ways,user_account,pay_status, + ->field('pay_ways,user_account,pay_status,create_time, SUM(if(pay_status=0,pay_amount,0)) fail_invest_amount, SUM(if(pay_status=1,pay_amount,0)) success_invest_amount, SUM(if(pay_status=2,pay_amount,0)) nothing_invest_amount, count(if(pay_status=0,pay_amount,null)) fail_invest_count, count(if(pay_status=1,pay_amount,null)) success_invest_count, count(if(pay_status=2,pay_amount,null)) nothing_invest_count') + ->where($map) + ->group('a.pay_ways,a.user_account,a.pay_status') + ->select(false); + $sum = M()->table('('.$sum.') as a') + ->field('pay_ways,user_account,pay_status,create_time, + SUM(if(pay_status=0,fail_invest_amount,0)) fail_invest_amount, + SUM(if(pay_status=1,success_invest_amount,0)) success_invest_amount, + SUM(if(pay_status=2,nothing_invest_amount,0)) nothing_invest_amount, + count(if(pay_status=0,fail_invest_count,null)) fail_invest_count, + count(if(pay_status=1,success_invest_count,null)) success_invest_count, + count(if(pay_status=2,nothing_invest_count,null)) nothing_invest_count') ->group('a.user_account,a.pay_status') ->select(false); @@ -279,34 +333,14 @@ class PayChannelIntentionController extends AdminController ->field('"汇总(检索时间内所有数据的统计)" pay_ways,"" other, count(if(pay_status=1,success_invest_count,NULL)) success_invest_count, sum(success_invest_amount) success_invest_amount, - count(if(pay_status=2,nothing_invest_count,NULL)) nothing_invest_count, - sum(nothing_invest_amount) nothing_invest_amount, count(if(pay_status=0,fail_invest_count,NULL)) fail_invest_count, - sum(fail_invest_amount) fail_invest_amount + sum(fail_invest_amount) fail_invest_amount, + count(if(pay_status=2,nothing_invest_count,NULL)) nothing_invest_count, + sum(nothing_invest_amount) nothing_invest_amount ') - ->where($map) ->find(); -// $sum = M()->table('('.$show_data.') as a') -// ->field('pay_ways,user_account, -// SUM(if(pay_status=0,pay_amount,0)) fail_invest_amount, -// SUM(if(pay_status=1,pay_amount,0)) success_invest_amount, -// SUM(if(pay_status=2,pay_amount,0)) nothing_invest_amount, -// count(if(pay_status=0,pay_amount,null)) fail_invest_count, -// count(if(pay_status=1,pay_amount,null)) success_invest_count, -// count(if(pay_status=2,pay_amount,null)) nothing_invest_count') -// ->group('a.pay_ways') -// ->select(false); -// -// $sum = M()->table('('.$sum.') as a') -// ->field('"" as pay_ways_ch,"" as pay_way, -// sum(success_invest_count) success_invest_count, -// sum(success_invest_amount) success_invest_amount, -// sum(nothing_invest_count) nothing_invest_count, -// sum(nothing_invest_amount) nothing_invest_amount, -// sum(fail_invest_count) fail_invest_count, -// sum(fail_invest_amount) fail_invest_amount') -// ->find(); + mb_convert_variables('GBK', 'UTF-8', $sum); fputcsv($fp, $sum); //刷新输出缓冲到浏览器 @@ -335,7 +369,7 @@ class PayChannelIntentionController extends AdminController $map = []; if ($_REQUEST['pay_ways']) { - $map['pay_ways'] = $_REQUEST['pay_ways']; + $map['pay_ways'] = ['like',"%{$_REQUEST['pay_ways']}"]; } if ($_REQUEST['user_account']) { @@ -369,25 +403,35 @@ class PayChannelIntentionController extends AdminController // $map['create_time'] = ['elt',strtotime($_REQUEST['time_end'])]; } +// var_dump($map);die(); + $data = M('pay_channel_intention','tab_') - ->field('group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways, + ->field('id,group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways, count(if(tab_pay_channel_intention.pay_way="alipay",tab_pay_channel_intention.pay_way,null)) alipay, count(if(tab_pay_channel_intention.pay_way="wxpay",tab_pay_channel_intention.pay_way,null)) wxpay, count(if(tab_pay_channel_intention.pay_way="sqpay",tab_pay_channel_intention.pay_way,null)) sqshorcut, count(if(tab_pay_channel_intention.pay_way="yeepay",tab_pay_channel_intention.pay_way,null)) shorcut, tab_pay_channel_intention.user_account, tab_pay_channel_intention.pay_amount, - CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status, - CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status, - tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time') + tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time,max(create_time) m_time') // ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number') ->group('tab_pay_channel_intention.pay_order_number') - ->order('tab_pay_channel_intention.create_time DESC') + ->order('tab_pay_channel_intention.id DESC') ->select(false); -// var_dump($data);die(); + + $data = M('pay_channel_intention','tab_') + ->field('a.*, + CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status, + CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status') + ->join("left join ({$data}) as a on tab_pay_channel_intention.pay_order_number=a.pay_order_number and tab_pay_channel_intention.create_time=m_time") + ->where('pay_ways is not null') + ->select(false); + +// dump($data);die(); $count = M()->table('('.$data.') as a') + ->field('id') ->where($map) ->count(); @@ -410,14 +454,20 @@ class PayChannelIntentionController extends AdminController count(if(tab_pay_channel_intention.pay_way="yeepay",tab_pay_channel_intention.pay_way,null)) shorcut, tab_pay_channel_intention.user_account, tab_pay_channel_intention.pay_amount, - CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status, - CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status, - tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time') + tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time,max(create_time) m_time') // ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number') ->group('tab_pay_channel_intention.pay_order_number') ->order('tab_pay_channel_intention.create_time ASC') ->select(false); + $sum = M('pay_channel_intention','tab_') + ->field('a.*, + CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status, + CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status') + ->join("left join ({$sum}) as a on tab_pay_channel_intention.pay_order_number=a.pay_order_number and tab_pay_channel_intention.create_time=m_time") + ->where('pay_ways is not null') + ->select(false); + $sum = M()->table('('.$sum.') as a') ->field("sum(pay_amount) pay_amount,sum(alipay) alipay,sum(wxpay) wxpay,sum(sqshorcut) sqshorcut,sum(shorcut) shorcut") ->where($map) @@ -448,7 +498,7 @@ class PayChannelIntentionController extends AdminController $map = []; if ($_REQUEST['pay_ways']) { - $map['pay_ways'] = $_REQUEST['pay_ways']; + $map['pay_ways'] = ['like',"%{$_REQUEST['pay_ways']}"]; } if ($_REQUEST['user_account']) { @@ -477,19 +527,26 @@ class PayChannelIntentionController extends AdminController } $data = M('pay_channel_intention','tab_') - ->field('group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways, + ->field('id,group_concat(tab_pay_channel_intention.`pay_way` ORDER BY tab_pay_channel_intention.create_time ASC) as pay_ways, count(if(tab_pay_channel_intention.pay_way="alipay",tab_pay_channel_intention.pay_way,null)) alipay, count(if(tab_pay_channel_intention.pay_way="wxpay",tab_pay_channel_intention.pay_way,null)) wxpay, count(if(tab_pay_channel_intention.pay_way="sqpay",tab_pay_channel_intention.pay_way,null)) sqshorcut, count(if(tab_pay_channel_intention.pay_way="yeepay",tab_pay_channel_intention.pay_way,null)) shorcut, tab_pay_channel_intention.user_account, tab_pay_channel_intention.pay_amount, - CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status, - CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status, - tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time') + tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time,max(create_time) m_time') // ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number') ->group('tab_pay_channel_intention.pay_order_number') - ->order('tab_pay_channel_intention.create_time DESC') + ->order('tab_pay_channel_intention.id DESC') + ->select(false); + + + $data = M('pay_channel_intention','tab_') + ->field('a.*, + CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status, + CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status') + ->join("left join ({$data}) as a on tab_pay_channel_intention.pay_order_number=a.pay_order_number and tab_pay_channel_intention.create_time=m_time") + ->where('pay_ways is not null') ->select(false); $csvFileName = $xlsName.'.csv'; @@ -559,14 +616,20 @@ class PayChannelIntentionController extends AdminController count(if(tab_pay_channel_intention.pay_way="yeepay",tab_pay_channel_intention.pay_way,null)) shorcut, tab_pay_channel_intention.user_account, tab_pay_channel_intention.pay_amount, - CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status, - CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status, - tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time') -// ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number') + tab_pay_channel_intention.pay_order_number,tab_pay_channel_intention.create_time,max(create_time) m_time') +// ->join('left join tab_spend on tab_pay_channel_intention.pay_order_number=tab_spend.pay_order_number') ->group('tab_pay_channel_intention.pay_order_number') ->order('tab_pay_channel_intention.create_time ASC') ->select(false); + $sum = M('pay_channel_intention','tab_') + ->field('a.*, + CASE WHEN is_submit = 0 THEN 2 ELSE pay_status END as pay_status, + CASE WHEN is_submit = 0 THEN 2 ELSE pay_game_status END as pay_game_status') + ->join("left join ({$sum}) as a on tab_pay_channel_intention.pay_order_number=a.pay_order_number and tab_pay_channel_intention.create_time=m_time") + ->where('pay_ways is not null') + ->select(false); + $sum = M()->table('('.$sum.') as a') ->field("'汇总(检索时间内所有数据的统计)' as user_account,sum(pay_amount) pay_amount,sum(alipay) alipay,sum(wxpay) wxpay,sum(sqshorcut) sqshorcut,sum(shorcut) shorcut") ->where($map) diff --git a/Application/Admin/View/PayChannelIntention/detail.html b/Application/Admin/View/PayChannelIntention/detail.html index 17eb5952c..1cd236638 100644 --- a/Application/Admin/View/PayChannelIntention/detail.html +++ b/Application/Admin/View/PayChannelIntention/detail.html @@ -231,9 +231,9 @@ - + - + @@ -309,8 +309,8 @@ {$data.shorcut} {$data.sqshorcut} {$data.create_time} - 支付失败 下单未支付 支付成功
- 通知失败 未通知 通知成功 + 支付失败 下单未支付 支付成功
+ 通知失败 未通知 通知成功 {$data.pay_order_number} diff --git a/Application/Admin/View/PayChannelIntention/index.html b/Application/Admin/View/PayChannelIntention/index.html index 441c02988..ab6142ef8 100644 --- a/Application/Admin/View/PayChannelIntention/index.html +++ b/Application/Admin/View/PayChannelIntention/index.html @@ -223,8 +223,8 @@ - - + + @@ -295,21 +295,21 @@ {$data.pay_way} {$data.success_invest_count} {$data.success_invest_amount} - {$data.nothing_invest_count} - {$data.nothing_invest_amount} {$data.fail_invest_count} {$data.fail_invest_amount} + {$data.nothing_invest_count} + {$data.nothing_invest_amount} 汇总(检索时间内所有数据的统计) - {$sum.success_invest_count} + {$sum.success_invest_count} {$sum.success_invest_amount} - {$sum.nothing_invest_count} - {$sum.nothing_invest_amount} - {$sum.fail_invest_count} + {$sum.fail_invest_count} {$sum.fail_invest_amount} + {$sum.nothing_invest_count} + {$sum.nothing_invest_amount}