diff --git a/app/Console/Commands/ProductSkuUpdate.php b/app/Console/Commands/ProductSkuUpdate.php index 79b6a8d4..724c96b9 100644 --- a/app/Console/Commands/ProductSkuUpdate.php +++ b/app/Console/Commands/ProductSkuUpdate.php @@ -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; }