|
|
@ -91,6 +91,7 @@ class QueryController extends BaseController
|
|
|
|
|
|
|
|
|
|
|
|
$data = [];
|
|
|
|
$data = [];
|
|
|
|
$count = 0;
|
|
|
|
$count = 0;
|
|
|
|
|
|
|
|
$income = '0.00';
|
|
|
|
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
|
|
|
|
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
|
|
|
|
$data = M('Spend', 'tab_')
|
|
|
|
$data = M('Spend', 'tab_')
|
|
|
|
->field('tab_spend.*,tab_promote.account as pro_account,tab_promote.real_name as pro_real_name,tab_promote.chain as chain')
|
|
|
|
->field('tab_spend.*,tab_promote.account as pro_account,tab_promote.real_name as pro_real_name,tab_promote.chain as chain')
|
|
|
@ -105,6 +106,14 @@ class QueryController extends BaseController
|
|
|
|
->join('tab_game on tab_spend.game_id = tab_game.id')
|
|
|
|
->join('tab_game on tab_spend.game_id = tab_game.id')
|
|
|
|
->where($map)
|
|
|
|
->where($map)
|
|
|
|
->count();
|
|
|
|
->count();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$income = M('Spend', 'tab_')
|
|
|
|
|
|
|
|
->field('sum(tab_spend.pay_amount) as income')
|
|
|
|
|
|
|
|
->join('tab_game on tab_spend.game_id = tab_game.id')
|
|
|
|
|
|
|
|
->join('left join tab_promote on tab_spend.promote_id = tab_promote.id')
|
|
|
|
|
|
|
|
->where($map)
|
|
|
|
|
|
|
|
->order('tab_spend.id desc')
|
|
|
|
|
|
|
|
->find()['income'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!empty($data)) {
|
|
|
|
if (!empty($data)) {
|
|
|
|
foreach ($data as &$list) {
|
|
|
|
foreach ($data as &$list) {
|
|
|
@ -177,6 +186,7 @@ class QueryController extends BaseController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->assign('listData', $data);
|
|
|
|
$this->assign('listData', $data);
|
|
|
|
$this->assign('count', $count);
|
|
|
|
$this->assign('count', $count);
|
|
|
|
|
|
|
|
$this->assign('income', $income);
|
|
|
|
$this->assign('initBegTime', $initBegTime);
|
|
|
|
$this->assign('initBegTime', $initBegTime);
|
|
|
|
$this->assign('initEndTime', $initEndTime);
|
|
|
|
$this->assign('initEndTime', $initEndTime);
|
|
|
|
$this->assign('setdate', date("Y-m-d"));
|
|
|
|
$this->assign('setdate', date("Y-m-d"));
|
|
|
@ -1736,6 +1746,7 @@ class QueryController extends BaseController
|
|
|
|
$records = [];
|
|
|
|
$records = [];
|
|
|
|
$pagination = '';
|
|
|
|
$pagination = '';
|
|
|
|
$count = 0;
|
|
|
|
$count = 0;
|
|
|
|
|
|
|
|
$total = [];
|
|
|
|
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
|
|
|
|
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
|
|
|
|
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
|
|
|
|
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
|
|
|
|
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
|
|
|
|
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
|
|
|
@ -1824,6 +1835,11 @@ class QueryController extends BaseController
|
|
|
|
$query = M()->alias('record')
|
|
|
|
$query = M()->alias('record')
|
|
|
|
->table($subQuery)
|
|
|
|
->table($subQuery)
|
|
|
|
->order($orderBy);
|
|
|
|
->order($orderBy);
|
|
|
|
|
|
|
|
$total = M('user_play_data_count', 'tab_')->alias('uc')
|
|
|
|
|
|
|
|
->field($fieldUC)
|
|
|
|
|
|
|
|
->join('tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
|
|
|
|
|
|
|
|
->where($map)
|
|
|
|
|
|
|
|
->find();
|
|
|
|
|
|
|
|
|
|
|
|
list($records, $pagination, $count) = $this->paginate($query);
|
|
|
|
list($records, $pagination, $count) = $this->paginate($query);
|
|
|
|
|
|
|
|
|
|
|
@ -1839,6 +1855,7 @@ class QueryController extends BaseController
|
|
|
|
$this->assign('records', $records);
|
|
|
|
$this->assign('records', $records);
|
|
|
|
$this->assign('pagination', $pagination);
|
|
|
|
$this->assign('pagination', $pagination);
|
|
|
|
$this->assign('count', $count);
|
|
|
|
$this->assign('count', $count);
|
|
|
|
|
|
|
|
$this->assign('total', $total);
|
|
|
|
$this->assign('initBegTime', $initBegTime);
|
|
|
|
$this->assign('initBegTime', $initBegTime);
|
|
|
|
$this->assign('initEndTime', $initEndTime);
|
|
|
|
$this->assign('initEndTime', $initEndTime);
|
|
|
|
$this->assign('sort', $sort);
|
|
|
|
$this->assign('sort', $sort);
|
|
|
|