Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
chenzhi 5 years ago
commit 00702fcd79

@ -924,6 +924,7 @@ public function auto_rrdae(){
$map['pay_status'] = 1; $map['pay_status'] = 1;
$map['pay_game_status'] = 1; $map['pay_game_status'] = 1;
$map['game_player_id'] = ['gt', 0]; $map['game_player_id'] = ['gt', 0];
$map['server_id'] = ['gt', 0];
$field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,promote_id,user_id,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count'; $field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,promote_id,user_id,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count';
$spendData = M('spend', 'tab_')->field($field) $spendData = M('spend', 'tab_')->field($field)
->where($map) ->where($map)

@ -532,15 +532,17 @@ class ExportController extends Controller
} }
unset($xlsData[$k]['age_status']); unset($xlsData[$k]['age_status']);
unset($xlsData[$k]['register_way']); unset($xlsData[$k]['register_way']);
mb_convert_variables('GBK', 'UTF-8', $v);
fputcsv($fp, $v);
} }
} }
foreach($xlsData as $value) { // foreach($xlsData as $value) {
mb_convert_variables('GBK', 'UTF-8', $value); // mb_convert_variables('GBK', 'UTF-8', $value);
fputcsv($fp, $value); // fputcsv($fp, $value);
$lastId = $value['id']; // $lastId = $value['id'];
} // }
unset($xlsData);//释放变量的内存 unset($xlsData);//释放变量的内存
//刷新输出缓冲到浏览器 //刷新输出缓冲到浏览器
ob_flush(); ob_flush();

Loading…
Cancel
Save