diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index 55602bbcb..97377d250 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -907,6 +907,7 @@ public function auto_rrdae(){ { $res = M('user_play_data_count', 'tab_')->order('id asc')->find(); if (empty($res)) { + ini_set('memory_limit','500M'); $time = strtotime(date('Y-m-d 00:00:00', time())); $map['pay_time'] = ['lt', $time]; @@ -931,17 +932,20 @@ public function auto_rrdae(){ if (!empty($spendData)) { $data = []; - foreach ($spendData as $list) { - $save['promote_id'] = $list['promote_id']; - $save['user_id'] = $list['user_id']; - $save['game_id'] = $list['game_id']; - $save['server_id'] = $list['server_id']; - $save['role_id'] = $list['game_player_id']; - $save['recharge_cost'] = $list['recharge_cost']; - $save['recharge_count'] = $list['recharge_count']; - $save['create_time'] = strtotime($list['day']); - $data[] = $save; + foreach ($spendData as &$list) { + $data[] = [ + 'promote_id' => $list['promote_id'], + 'user_id' => $list['user_id'], + 'game_id' => $list['game_id'], + 'server_id' => $list['server_id'], + 'role_id' => $list['game_player_id'], + 'recharge_cost' => $list['recharge_cost'], + 'recharge_count' => $list['recharge_count'], + 'create_time' => strtotime($list['day']), + ]; + unset($list); } + unset($spendData); M('user_play_data_count', 'tab_')->addAll($data); } }