virtual_order_id
This commit is contained in:
parent
cb391db692
commit
0127e44de5
@ -295,13 +295,12 @@ class OrderService extends Service
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$array = array_chunk($data, 1000);
|
foreach (array_chunk($data, 1000) as $value) {
|
||||||
|
|
||||||
foreach ($array as $value) {
|
|
||||||
DB::table($table)->upsert($value, ['sim', 'order_id', 'deleted_at']);
|
DB::table($table)->upsert($value, ['sim', 'order_id', 'deleted_at']);
|
||||||
$simArray = implode(',', array_pluck($value, 'sim'));
|
$simArray = implode(',', array_pluck($value, 'sim'));
|
||||||
DB::statement("select fix_timelines('{{$simArray}}'::INT8[]);");
|
DB::statement("select fix_timelines('{{$simArray}}'::INT8[]);");
|
||||||
RealOrderCardPartition::whereIn('order_id', array_pluck($array, 'order_id'))->whereIn('sim', array_pluck($value, 'sim'))->update(['virtual_order_id' => $node['id']]);
|
RealOrderCardPartition::whereIn('order_id', array_pluck($array, 'order_id'))
|
||||||
|
->whereIn('sim', array_pluck($value, 'sim'))->update(['virtual_order_id' => $node['id']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user