6
0
Fork 0

add command

base
panliang 2022-08-17 13:31:04 +08:00
parent 3052b115c0
commit 36ffeafb70
1 changed files with 7 additions and 0 deletions

View File

@ -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;
}