getTable
This commit is contained in:
parent
b6f1b69f32
commit
98d69274bd
@ -161,12 +161,13 @@ class LogSyncJob implements ShouldQueue
|
|||||||
$relationArray = array_groupBy($relationArray, 'type');
|
$relationArray = array_groupBy($relationArray, 'type');
|
||||||
|
|
||||||
foreach ($relationArray as $type => $array) {
|
foreach ($relationArray as $type => $array) {
|
||||||
$builder = (new $orderClasses[$type])->query()->toBase();
|
$class = new self::$orderClasses[$type];
|
||||||
|
$builder = $class->query()->toBase();
|
||||||
|
|
||||||
$sql = $builder->getGrammar()->compileInsert($builder, $array);
|
$sql = $builder->getGrammar()->compileInsert($builder, $array);
|
||||||
|
|
||||||
$sql .= " on conflict (order_id, sim, COALESCE(deleted_at, '1970-01-01 08:00:00'::timestamp)) do update set
|
$sql .= " on conflict (order_id, sim, COALESCE(deleted_at, '1970-01-01 08:00:00'::timestamp)) do update set
|
||||||
counts=virtual_order_cards_partition.counts + excluded.counts";
|
counts={$class->getTable()}.counts + excluded.counts";
|
||||||
|
|
||||||
$builder->connection->insert($sql, Arr::flatten($array, 1));
|
$builder->connection->insert($sql, Arr::flatten($array, 1));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user