setName('clear:redundancy') ->setDescription('已删除的商户的商品相关数据'); } protected function execute(Input $input, Output $output) { try{ app()->make(MerchantRepository::class)->clearRedundancy(); }catch (\Exception $exception){ Log::info('清除冗余错误:'.$exception->getMessage()); } $output->info('执行成功'); } }