自动脚本->玩家角色充值数据统计

master
chenxiaojun 5 years ago
parent 30d9c30522
commit 3a867f60e3

@ -924,14 +924,14 @@ public function auto_rrdae(){
$map['pay_game_status'] = 1;
$map['game_player_id'] = ['gt', 0];
$field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count';
$spendCostData = M('spend', 'tab_')->field($field)
$spendData = M('spend', 'tab_')->field($field)
->where($map)
->group('day,game_player_id,server_id,game_id')
->select();
if (!empty($spendCostData)) {
if (!empty($spendData)) {
$data = [];
foreach ($spendCostData as $list) {
foreach ($spendData as $list) {
$save['game_id'] = $list['game_id'];
$save['server_id'] = $list['server_id'];
$save['role_id'] = $list['game_player_id'];

Loading…
Cancel
Save