Merge branch 'dev' of 47.111.118.107:wmtx/platform into dev

master
ELF 5 years ago
commit db46d4b079

@ -2078,11 +2078,19 @@ class ExportController extends Controller
array('device_number', '设备号'), array('device_number', '设备号'),
array('game_name', '游戏'), array('game_name', '游戏'),
array('pay_time', '购买时间'), array('pay_time', '购买时间'),
array('super_money', '超级签金额'), array('pay_way', '支付方式'),
array('pay_price', '超级签金额'),
); );
$xlsData = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->order('id DESC')->select(); $xlsData = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.pay_price,tab_game_supersign.pay_way,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->order('id DESC')->select();
foreach($xlsData as $k => $v) { foreach($xlsData as $k => $v) {
$xlsData[$k]['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']); $xlsData[$k]['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']);
if($v['pay_way'] == 0) {
$xlsData[$k]['pay_way'] = '未知';
}elseif ($v['pay_way'] == 1) {
$xlsData[$k]['pay_way'] = '支付宝';
}elseif ($v['pay_way'] == 2) {
$xlsData[$k]['pay_way'] = '微信';
}
} }
break; break;
case 24: case 24:

@ -8,6 +8,12 @@ class SuperStatisticalController extends ThinkController
private $ticketList_url = 'https://app.ipa365.com/Kirin/OpenApi/TicketList'; private $ticketList_url = 'https://app.ipa365.com/Kirin/OpenApi/TicketList';
private $pay_way = [
0 => '未知',
1 => '支付宝',
2 => '微信',
];
public function index() { public function index() {
$params = I('get.'); $params = I('get.');
$startDate = empty($params['timestart']) ? '': $params['timestart']; $startDate = empty($params['timestart']) ? '': $params['timestart'];
@ -148,9 +154,12 @@ class SuperStatisticalController extends ThinkController
if(isset($params['game_id'])) { if(isset($params['game_id'])) {
$map['tab_game_supersign.game_id'] = $params['game_id']; $map['tab_game_supersign.game_id'] = $params['game_id'];
} }
$data = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time,tab_game_supersign.pay_price')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->page($page,$row)->order('id DESC')->select(); $data = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.pay_way,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time,tab_game_supersign.pay_price')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->page($page,$row)->order('id DESC')->select();
$count = M('game_supersign', 'tab_')->field('tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->count(); $count = M('game_supersign', 'tab_')->field('tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->count();
foreach($data as $k => $v) {
$data[$k]['pay_way'] = $this->pay_way[$v['pay_way']];
}
$pay_price = M('game_supersign', 'tab_')->field('sum(pay_price) as pay_price')->where($map)->select(); $pay_price = M('game_supersign', 'tab_')->field('sum(pay_price) as pay_price')->where($map)->select();
$super_money_all = $pay_price[0]['pay_price'] == '' ? 0 : $pay_price[0]['pay_price']; $super_money_all = $pay_price[0]['pay_price'] == '' ? 0 : $pay_price[0]['pay_price'];
$page = set_pagination($count, $row); $page = set_pagination($count, $row);

@ -116,6 +116,7 @@
<th>设备号</th> <th>设备号</th>
<th>游戏</th> <th>游戏</th>
<th>购买时间</th> <th>购买时间</th>
<th>支付方式</th>
<th>超级签金额</th> <th>超级签金额</th>
</tr> </tr>
</thead> </thead>
@ -129,6 +130,7 @@
<td>{$vo.device_number}</td> <td>{$vo.device_number}</td>
<td>{$vo.game_name}</td> <td>{$vo.game_name}</td>
<td>{$vo.pay_time|date='Y-m-d H:i:s',###}</td> <td>{$vo.pay_time|date='Y-m-d H:i:s',###}</td>
<td>{$vo.pay_way}</td>
<td>{$vo.pay_price}</td> <td>{$vo.pay_price}</td>
</tr> </tr>
</volist> </volist>
@ -139,6 +141,7 @@
<td>--</td> <td>--</td>
<td>--</td> <td>--</td>
<td>--</td> <td>--</td>
<td>--</td>
<td>{$super_money_all}</td> <td>{$super_money_all}</td>
</tr> </tr>
</tbody> </tbody>

@ -1863,7 +1863,7 @@ class QueryController extends BaseController
->field($field) ->field($field)
->join('join tab_user as u on u.id = s.user_id') ->join('join tab_user as u on u.id = s.user_id')
->where($map) ->where($map)
->group('s.game_player_id, s.server_id, s.game_id') ->group('s.game_player_id, s.server_id, s.game_id, s.user_id')
->having($having) ->having($having)
->buildSql(); ->buildSql();
$query = M()->alias('record') $query = M()->alias('record')

Loading…
Cancel
Save