调整数据库结构
This commit is contained in:
parent
e4d33aa8ce
commit
d44c9c3984
@ -39,39 +39,44 @@ class OrderBaseSync extends Command
|
||||
unset($cards);
|
||||
unset($card_details);
|
||||
|
||||
$this->line('插入订单数据,条数:'.count($dataOrders));
|
||||
foreach (array_chunk($dataOrders, $this->chunks) as $data) {
|
||||
echo '.';
|
||||
Order::replace($data);
|
||||
try {
|
||||
$this->line('插入订单数据,条数:'.count($dataOrders));
|
||||
foreach (array_chunk($dataOrders, $this->chunks) as $data) {
|
||||
echo '.';
|
||||
Order::replace($data);
|
||||
}
|
||||
app(OrderRepository::class)->forgetCached();
|
||||
unset($dataOrders);
|
||||
$this->line('插入订单数据成功');
|
||||
|
||||
$this->line('插入卡数据,条数:'.count($dataCards));
|
||||
foreach (array_chunk($dataCards, $this->chunks) as $data) {
|
||||
echo '.';
|
||||
Card::replace($data);
|
||||
}
|
||||
app(CardRepository::class)->forgetCached();
|
||||
unset($dataCards);
|
||||
$this->line('插入卡数据成功');
|
||||
|
||||
$this->line('插入订单关联数据,条数:'.count($dataOrderCards));
|
||||
foreach (array_chunk($dataOrderCards, $this->chunks) as $data) {
|
||||
echo '.';
|
||||
DB::table('real_order_base_cards')->replace($data);
|
||||
}
|
||||
unset($dataOrderCards);
|
||||
$this->line('插入订单关联数据成功');
|
||||
|
||||
$this->line('插入套餐关联数据,条数:'.count($dataPackageCards));
|
||||
foreach (array_chunk($dataPackageCards, $this->chunks) as $data) {
|
||||
echo '.';
|
||||
DB::table('real_package_base_cards')->replace($data);
|
||||
}
|
||||
unset($dataOrderCards);
|
||||
$this->line('插入套餐关联数据成功');
|
||||
} catch (\Exception $e) {
|
||||
$this->error($e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
app(OrderRepository::class)->forgetCached();
|
||||
unset($dataOrders);
|
||||
$this->line('插入订单数据成功');
|
||||
|
||||
$this->line('插入卡数据,条数:'.count($dataCards));
|
||||
foreach (array_chunk($dataCards, $this->chunks) as $data) {
|
||||
echo '.';
|
||||
Card::replace($data);
|
||||
}
|
||||
app(CardRepository::class)->forgetCached();
|
||||
unset($dataCards);
|
||||
$this->line('插入卡数据成功');
|
||||
|
||||
$this->line('插入订单关联数据,条数:'.count($dataOrderCards));
|
||||
foreach (array_chunk($dataOrderCards, $this->chunks) as $data) {
|
||||
echo '.';
|
||||
DB::table('real_order_base_cards')->replace($data);
|
||||
}
|
||||
unset($dataOrderCards);
|
||||
$this->line('插入订单关联数据成功');
|
||||
|
||||
$this->line('插入套餐关联数据,条数:'.count($dataPackageCards));
|
||||
foreach (array_chunk($dataPackageCards, $this->chunks) as $data) {
|
||||
echo '.';
|
||||
DB::table('real_package_base_cards')->replace($data);
|
||||
}
|
||||
unset($dataOrderCards);
|
||||
$this->line('插入套餐关联数据成功');
|
||||
}
|
||||
|
||||
// 获取月销售卡数据
|
||||
|
23
config/cors.php
Normal file
23
config/cors.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Laravel CORS
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| allowedOrigins, allowedHeaders and allowedMethods can be set to array('*')
|
||||
| to accept any value.
|
||||
|
|
||||
*/
|
||||
|
||||
'supportsCredentials' => false,
|
||||
'allowedOrigins' => ['*'],
|
||||
'allowedOriginsPatterns' => [],
|
||||
'allowedHeaders' => ['*'],
|
||||
'allowedMethods' => ['*'],
|
||||
'exposedHeaders' => ['Authorization'],
|
||||
'maxAge' => 0,
|
||||
|
||||
];
|
0
storage/app/.gitignore
vendored
Normal file → Executable file
0
storage/app/.gitignore
vendored
Normal file → Executable file
0
storage/framework/cache/.gitignore
vendored
Normal file → Executable file
0
storage/framework/cache/.gitignore
vendored
Normal file → Executable file
0
storage/framework/views/.gitignore
vendored
Normal file → Executable file
0
storage/framework/views/.gitignore
vendored
Normal file → Executable file
0
storage/logs/.gitignore
vendored
Normal file → Executable file
0
storage/logs/.gitignore
vendored
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user