充值玩家--更新

master
chenxiaojun 5 years ago
commit d3a4933b5c

@ -3238,9 +3238,13 @@ class DownloadController extends BaseController {
$roles = M()->alias('record')
->table($subQuery)
->select();
$total = M('spend','tab_')->alias('uc')
->field("$fieldS,$fieldToday as recharge_cost_today")
$totalSql = M('spend', 'tab_')->alias('uc')
->field("$fieldS, $fieldToday as recharge_cost_today")
->where($map)
->buildSql();
$total = M()->table($totalSql)
->alias('total')
->field('sum(recharge_cost) as recharge_cost, sum(recharge_count) as recharge_count, sum(recharge_cost_today) as recharge_cost_today')
->find();
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' :$total['recharge_cost_today'];
$csvFileName = $xlsName.'.csv';

@ -1872,9 +1872,13 @@ class QueryController extends BaseController
list($records, $pagination, $count) = $this->paginate($query);
$total = M('spend', 'tab_')->alias('s')
$totalSql = M('spend', 'tab_')->alias('s')
->field("$fieldS, $fieldToday as recharge_cost_today")
->where($map)
->buildSql();
$total = M()->table($totalSql)
->alias('total')
->field('sum(recharge_cost) as recharge_cost, sum(recharge_count) as recharge_count, sum(recharge_cost_today) as recharge_cost_today')
->find();
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' : $total['recharge_cost_today'];

Loading…
Cancel
Save