推广平台->数据管理-订单查询|数据管理-充值统计|财务管理-结算明细--新增合计

master
chenxiaojun 5 years ago
parent d600886e91
commit ca5da52a4d

@ -182,6 +182,7 @@ class FinanceController extends BaseController
$parameter['endtime'] = $initEndTime;
$data = [];
$total = [];
$count = 0;
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
$withdrawIds = [];
@ -222,6 +223,10 @@ class FinanceController extends BaseController
->page($page, $row)
->select();
$count = $model->where($map)->count();
$total = $model->field('sum(pay_amount) as pay_amount,pay_way,sum(if(selle_ratio >= 0,selle_ratio * pay_amount,0)) as income')
->where($map)
->find();
$total['income'] = bcdiv($total['income'], 100, 2);
//提现状态
if (empty($withdrawIds)) {
@ -264,6 +269,7 @@ class FinanceController extends BaseController
$this->assign('listData', $data);
$this->assign('count', $count);
$this->assign('total', $total);
$this->assign('initBegTime', $initBegTime);
$this->assign('initEndTime', $initEndTime);
$this->assign('_page', $page);

Loading…
Cancel
Save