提示
This commit is contained in:
parent
2d7763cc94
commit
559be53fb6
@ -29,13 +29,21 @@ class VdActivated extends Command
|
|||||||
|
|
||||||
$time = $datetime->copy()->subMonths(self::INTERVAL_MONTH);
|
$time = $datetime->copy()->subMonths(self::INTERVAL_MONTH);
|
||||||
|
|
||||||
|
$this->line('开始同步已在VD上未激活卡的激活数据');
|
||||||
|
|
||||||
$startMicrotime = new UTCDateTime($datetime->copy()->subMonth());
|
$startMicrotime = new UTCDateTime($datetime->copy()->subMonth());
|
||||||
|
|
||||||
$cards = OrderCard::select('sim')->where('created_at', '>=', $time)
|
$cards = OrderCard::select('sim')->where('created_at', '>=', $time)
|
||||||
->whereNull('service_start_at')
|
->whereNull('service_start_at')
|
||||||
->orderBy('created_at', 'desc')->get()->pluck('sim')->toArray();
|
->orderBy('created_at', 'desc')->get()->pluck('sim')->toArray();
|
||||||
|
|
||||||
|
$this->line('同步条数 #:' . count($cards));
|
||||||
|
|
||||||
|
$this->line('chunk');
|
||||||
|
|
||||||
foreach (array_chunk($cards, 1000) as $simArray) {
|
foreach (array_chunk($cards, 1000) as $simArray) {
|
||||||
|
echo '.';
|
||||||
|
|
||||||
$simArray = array_map('strval', $simArray);
|
$simArray = array_map('strval', $simArray);
|
||||||
|
|
||||||
$res = TblCard::select(['cNo', 'saDate'])
|
$res = TblCard::select(['cNo', 'saDate'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user