|
|
|
@ -11,25 +11,25 @@ class BehaviorLogController extends ThinkController
|
|
|
|
|
|
|
|
|
|
$map = [];
|
|
|
|
|
if (isset($params['user_account'])) {
|
|
|
|
|
$map['tab_pay_info.user_account'] = $params['user_account'];
|
|
|
|
|
$map['user_account'] = $params['user_account'];
|
|
|
|
|
}
|
|
|
|
|
if (isset($params['extend'])) {
|
|
|
|
|
$map['tab_pay_info.extend'] = $params['extend'];
|
|
|
|
|
$map['_string'] = 'extend = "'.$params["extend"]. '" or order_id = "'.$params["extend"] . '"';
|
|
|
|
|
}
|
|
|
|
|
if (isset($params['game_name'])) {
|
|
|
|
|
$game_id = ['in', array_column(getGameByName($params['game_name'], $params['sdk_version']), 'id')];
|
|
|
|
|
$map['tab_pay_info.game_id'] = $game_id;
|
|
|
|
|
$map['game_id'] = $game_id;
|
|
|
|
|
}
|
|
|
|
|
if (isset($params['server_name'])) {
|
|
|
|
|
$game_id = M('game', 'tab_')->where(['relation_game_name' => $params['game_name'],'sdk_version' => $params['sdk_version']])->getField('id');
|
|
|
|
|
$server_id = M('server', 'tab_')->where(['server_name' => $params['server_name'], 'game_id' => $game_id])->getField('server_num');
|
|
|
|
|
$map['tab_pay_info.server_id'] = $server_id;
|
|
|
|
|
$map['server_id'] = $server_id;
|
|
|
|
|
}
|
|
|
|
|
if (isset($params['game_player_name'])) {
|
|
|
|
|
$map['tab_pay_info.game_player_name'] = $params['game_player_name'];
|
|
|
|
|
$map['game_player_name'] = $params['game_player_name'];
|
|
|
|
|
}
|
|
|
|
|
if (isset($params['game_player_id'])) {
|
|
|
|
|
$map['tab_pay_info.game_player_id'] = $params['game_player_id'];
|
|
|
|
|
$map['game_player_id'] = $params['game_player_id'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -40,7 +40,7 @@ class BehaviorLogController extends ThinkController
|
|
|
|
|
$endDate = empty($params['timeend']) ? date('Y-m-d') : $params['timeend'];
|
|
|
|
|
$startTime = strtotime($startDate);
|
|
|
|
|
$endTime = strtotime($endDate) + 86399;
|
|
|
|
|
$map['tab_pay_info.create_time'] = array('BETWEEN', [$startTime, $endTime]);
|
|
|
|
|
$map['create_time'] = array('BETWEEN', [$startTime, $endTime]);
|
|
|
|
|
if (isset($params['promote_id'])) {
|
|
|
|
|
$promoteId = $params['promote_id'];
|
|
|
|
|
if ($promoteId == 0) {
|
|
|
|
@ -52,13 +52,17 @@ class BehaviorLogController extends ThinkController
|
|
|
|
|
$map['promote_id'] = ['in', $promoteIds];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$data = M('pay_info', 'tab_')->field('tab_pay_info.id,tab_pay_info.user_account,extend,tab_pay_info.create_time,tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.promote_account,tab_pay_info.order_id,tab_pay_info.game_player_id,tab_pay_info.game_player_name,price,tab_server.server_name')->join('LEFT JOIN tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id AND tab_pay_info.server_id <> 0')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select();
|
|
|
|
|
// $data = M('pay_info', 'tab_')->field('tab_pay_info.id,tab_pay_info.user_account,extend,tab_pay_info.create_time,tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.promote_account,tab_pay_info.order_id,tab_pay_info.game_player_id,tab_pay_info.game_player_name,price,tab_server.server_name')->join('LEFT JOIN tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id AND tab_pay_info.server_id <> 0')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select();
|
|
|
|
|
$data = M('pay_info', 'tab_')->where($map)->order('id DESC')->page($p, $row)->select();
|
|
|
|
|
foreach($data as $k => $v) {
|
|
|
|
|
if(empty($v['extend'])) {
|
|
|
|
|
$data[$k]['extend'] = $v['order_id'];
|
|
|
|
|
}
|
|
|
|
|
if ($v['server_id'] > 0){
|
|
|
|
|
$data[$k]['server_name'] = M('server', 'tab_')->where(['game_id' => $v['game_id'],'server_num' =>$v['server_id']])->getField('server_name');
|
|
|
|
|
}
|
|
|
|
|
$count = M('pay_info', 'tab_')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->count();
|
|
|
|
|
}
|
|
|
|
|
$count = M('pay_info', 'tab_')->where($map)->count();
|
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
|
if ($page) {
|
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
|