|
|
@ -130,11 +130,15 @@ class FinanceController extends BaseController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$withdrawMap['promote_id'] = $this->loginPromote['id'];
|
|
|
|
$withdrawMap['promote_id'] = $this->loginPromote['id'];
|
|
|
|
$withdrawMap['status'] = ['neq', 2];
|
|
|
|
$withdrawMap['status'] = 2;
|
|
|
|
|
|
|
|
|
|
|
|
//已提现总额
|
|
|
|
//已提现总额
|
|
|
|
$income['withdrawn_amount'] = M('withdraw', 'tab_')->field('sum(sum_money) as withdrawn_amount')->where($withdrawMap)->find()['withdrawn_amount'];
|
|
|
|
$income['withdrawn_amount'] = M('withdraw', 'tab_')->field('sum(sum_money) as withdrawn_amount')->where($withdrawMap)->find()['withdrawn_amount'];
|
|
|
|
|
|
|
|
$withdrawMap['status'] = ['in', [-1, 0, 1]];
|
|
|
|
|
|
|
|
$notWithdrawnAmount = M('withdraw', 'tab_')->field('sum(sum_money) as withdrawn_amount')->where($withdrawMap)->find()['withdrawn_amount'];
|
|
|
|
$income['withdrawn_amount'] = $income['withdrawn_amount'] ?? '0.00';
|
|
|
|
$income['withdrawn_amount'] = $income['withdrawn_amount'] ?? '0.00';
|
|
|
|
|
|
|
|
$notWithdrawnAmount = $notWithdrawnAmount ?? 0;
|
|
|
|
|
|
|
|
$income['not_withdrawn_amount'] = bcadd($income['not_withdrawn_amount'], $notWithdrawnAmount, 2);
|
|
|
|
|
|
|
|
|
|
|
|
$withdrawMap['status'] = ['not in', [-2, -1]];
|
|
|
|
$withdrawMap['status'] = ['not in', [-2, -1]];
|
|
|
|
$withdrawns = M('withdraw', 'tab_')->field('settlement_begin_time, settlement_end_time')
|
|
|
|
$withdrawns = M('withdraw', 'tab_')->field('settlement_begin_time, settlement_end_time')
|
|
|
|