From 559be53fb60e9df5a654542ff477907853354ac4 Mon Sep 17 00:00:00 2001 From: denghy Date: Mon, 22 Apr 2019 16:14:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Domains/Virtual/Commands/Schedule/VdActivated.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Domains/Virtual/Commands/Schedule/VdActivated.php b/app/Domains/Virtual/Commands/Schedule/VdActivated.php index 49ddeba9..49ae080b 100644 --- a/app/Domains/Virtual/Commands/Schedule/VdActivated.php +++ b/app/Domains/Virtual/Commands/Schedule/VdActivated.php @@ -29,13 +29,21 @@ class VdActivated extends Command $time = $datetime->copy()->subMonths(self::INTERVAL_MONTH); + $this->line('开始同步已在VD上未激活卡的激活数据'); + $startMicrotime = new UTCDateTime($datetime->copy()->subMonth()); $cards = OrderCard::select('sim')->where('created_at', '>=', $time) ->whereNull('service_start_at') ->orderBy('created_at', 'desc')->get()->pluck('sim')->toArray(); + $this->line('同步条数 #:' . count($cards)); + + $this->line('chunk'); + foreach (array_chunk($cards, 1000) as $simArray) { + echo '.'; + $simArray = array_map('strval', $simArray); $res = TblCard::select(['cNo', 'saDate'])