游戏统计搜索时间范围

master
liuweiwen 5 years ago
parent b1e9127e9d
commit aaabd0a07f

@ -815,7 +815,7 @@ class FinanceController extends ThinkController
} else { } else {
$row = 10; $row = 10;
} }
$map['pay_status'] = 1; $map['pay_game_status'] = 1;
if (!empty(I("game_id"))) { if (!empty(I("game_id"))) {
$map['game_id'] = I("game_id"); $map['game_id'] = I("game_id");
} }
@ -829,12 +829,14 @@ class FinanceController extends ThinkController
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way"; $field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
$group = ""; $group = "";
$order = "pay_time DESC"; $order = "pay_time DESC";
$data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row); $data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row);
foreach($data as $key => $value) { foreach($data as $key => $value) {
$data[$key]['pay_way'] = getPayType($value['pay_way']); $data[$key]['pay_way'] = getPayType($value['pay_way']);
} }
$totalData = D('spend')->totalGameStatistics($map, false); $totalData = D('spend')->totalGameStatistics($map, false);
$sumCash = $totalData['cash_count'] ?? 0; $sumCash = $totalData['cash_count'] ?? 0;
$sumBalance = $totalData['balance_coin_count'] ?? 0; $sumBalance = $totalData['balance_coin_count'] ?? 0;
$sumInside = $totalData['inside_cash_count'] ?? 0; $sumInside = $totalData['inside_cash_count'] ?? 0;

@ -873,6 +873,7 @@ SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count");
$data = $query->where(['s.pay_status' => 1, 'pay_game_status' => 1]) $data = $query->where(['s.pay_status' => 1, 'pay_game_status' => 1])
->where($map) ->where($map)
->find(); ->find();
// dd($query->_sql());
return $data; return $data;
} }

@ -72,7 +72,7 @@
<div class="cf main-place top_nav_list navtab_list"> <div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$_REQUEST['count_date']}游戏统计</h3> <h3 class="page_title">{$_REQUEST['count_date']}游戏统计</h3>
<p class="description_text"></p> <p class="description_text">说明:仅统计通知成功</p>
</div> </div>
<div class="cf top_nav_list"> <div class="cf top_nav_list">

Loading…
Cancel
Save