add command
parent
3052b115c0
commit
36ffeafb70
|
|
@ -43,6 +43,9 @@ class ProductSkuUpdate extends Command
|
|||
$list = ProductSku::get();
|
||||
$attributes = ['cover', 'images', 'media', 'description'];
|
||||
|
||||
$bar = $this->output->createProgressBar($list->count());
|
||||
$bar->start();
|
||||
|
||||
$newUrl = 'https://jiqu-libs.oss-cn-chengdu.aliyuncs.com/';
|
||||
foreach($list as $item) {
|
||||
$data = [];
|
||||
|
|
@ -75,7 +78,11 @@ class ProductSkuUpdate extends Command
|
|||
if (count($data) > 0) {
|
||||
$item->forceFill($data)->save();
|
||||
}
|
||||
|
||||
$bar->advance();
|
||||
}
|
||||
$bar->finish();
|
||||
$this->line('');
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue