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