推广平台>数据管理>充值玩家--检索bug修复

master
chenxiaojun 5 years ago
parent 03edc87f4f
commit dc2c4ee652

@ -1877,14 +1877,20 @@ class QueryController extends BaseController
$query = M()->alias('record')
->table($subQuery)
->order($orderBy);
$total = M('user_play_data_count', 'tab_')->alias('uc')
list($records, $pagination, $count) = $this->paginate($query);
$totalQuery = M('user_play_data_count', 'tab_')->alias('uc')
->field($fieldUC)
->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.role_id = uc.role_id')
->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and uc.server_id = ui.server_id and ui.role_id = uc.role_id')
->group('uc.role_id,uc.game_id,uc.server_id,uc.user_id,uc.id')
->where($map)
->buildSql();
$total = M()->alias('totals')
->table($totalQuery)
->field('sum(recharge_cost) recharge_cost,sum(recharge_count) recharge_count,sum(recharge_cost_today) as recharge_cost_today')
->find();
list($records, $pagination, $count) = $this->paginate($query);
foreach ($records as &$list) {
if (empty($list['user_account']) ) {
$list['user_account'] = M('user', 'tab_')->where("id = {$list['user_id']}")->getField('account');

Loading…
Cancel
Save