充值玩家--更新

master
chenxiaojun 5 years ago
parent ee6c6e62b2
commit cc83e0e585

@ -1872,14 +1872,15 @@ class QueryController extends BaseController
list($records, $pagination, $count) = $this->paginate($query); list($records, $pagination, $count) = $this->paginate($query);
$totalSql = M('spend', 'tab_')->alias('s') $total = M('spend', 'tab_')->alias('s')
->field("$fieldS, $fieldToday as recharge_cost_today") ->field($fieldS)
->where($map) ->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(); ->find();
$map['s.pay_time'] = $spendMap['today.pay_time'];
$total['recharge_cost_today'] = M('spend', 'tab_')->alias('s')
->field('sum(s.pay_amount) as recharge_cost_today')
->where($map)
->find()['recharge_cost_today'];
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' : $total['recharge_cost_today']; $total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' : $total['recharge_cost_today'];
if (!empty($records)) { if (!empty($records)) {

Loading…
Cancel
Save