From e6c2779ee1324950b52c85e3b8763370b40fd766 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 26 Nov 2019 18:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E8=A7=92=E8=89=B2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=E8=84=9A=E6=9C=AC--=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/AutoController.class.php | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) 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); } }