平台统计修正

master
zhengyongxing 5 years ago
parent 65e13bbcc5
commit bd39f880fe

@ -1001,12 +1001,12 @@ class FinanceController extends ThinkController
} elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$time = array('elt', (strtotime($_REQUEST['timeend']) + 86399));
}
setPowerPromoteIds($map);
// setPowerPromoteIds($map);
//获取现金充值
$cashStatistics = M('spend', 'tab_')
->field('pay_way,"" as pay_type,SUM(pay_amount) AS pay_amount')
->where(['pay_status' => 1,'pay_way'=>['egt',1],'pay_time'=>$time,'promote_id'=>$map['promote_id']])
->where(['pay_status' => 1,'pay_way'=>['egt',1],'pay_time'=>$time])
->group('pay_way')
->select();
foreach ($cashStatistics as $key => $value) {
@ -1022,7 +1022,6 @@ class FinanceController extends ThinkController
'tab_deposit.pay_way' => ['gt', 0],
'extend'=>['eq','']
,'tab_deposit.create_time'=>$time,
'tab_deposit.promote_id'=>$map['promote_id']
])->field('tab_deposit.pay_way,"" as pay_type, SUM(tab_deposit.pay_amount) AS balance')
->join("inner join tab_pay_info on tab_pay_info.order_id=tab_deposit.pay_order_number")
->group('tab_deposit.pay_way')
@ -1061,8 +1060,7 @@ class FinanceController extends ThinkController
->where([
'pay_status' => 1,
'pay_way' => ['gt', 0],
'create_time'=>$time,
'promote_id'=>$map['promote_id']
'create_time'=>$time
])
->group('pay_way')
->select();
@ -1087,8 +1085,7 @@ class FinanceController extends ThinkController
->field("pay_way,'' as pay_type,sum(real_amount) as pay_amount")
->where([
'order_status'=>['egt',1],
'pay_way'=>['egt',1],'pay_time'=>$time,
'promote_id'=>$map['promote_id']
'pay_way'=>['egt',1],'pay_time'=>$time
])
->group('pay_way')
->select();
@ -1118,8 +1115,7 @@ class FinanceController extends ThinkController
'pay_status'=>1,
'pay_way'=>['egt',1],
'pay_source'=>0,
'create_time'=>$time,
'promote_id'=>$map['promote_id']
'create_time'=>$time
])
->group('pay_way')
->select();

Loading…
Cancel
Save