|
|
|
@ -146,6 +146,8 @@ class PresidentDepositController extends ThinkController
|
|
|
|
|
} else {
|
|
|
|
|
$countQuery = clone $query;
|
|
|
|
|
$promotes = $query->page($page, $row)->select();
|
|
|
|
|
// 汇总金额
|
|
|
|
|
$total = M('president_deposit', 'tab_')->where(['promote_id'=>['in', $countQuery->getField('id', true)]])->field('sum(amount) as totalAmount, sum(if(status = 1, amount, 0)) as confirmedAmount, sum(if(status = 2, amount, 0)) as refundedAmount')->find();
|
|
|
|
|
$count = $countQuery->count();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -241,12 +243,8 @@ class PresidentDepositController extends ThinkController
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->checkListOrCountAuthRestMap($map,[]);
|
|
|
|
|
|
|
|
|
|
// 汇总金额
|
|
|
|
|
$total = M('president_deposit', 'tab_')->field('sum(amount) as totalAmount, sum(if(status = 1, amount, 0)) as confirmedAmount')->find();
|
|
|
|
|
$total['unconfirmedamount'] = $total['totalamount'] - $total['confirmedamount'];
|
|
|
|
|
$total['unconfirmedamount'] = $total['totalamount'] - $total['confirmedamount'] - $total['refundedamount'];
|
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
|
if($page) {
|
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
|