setName('shopro_wechat_trade:retry-failed') ->addOption('limit', null, Option::VALUE_OPTIONAL, 'Max rows', 50) ->setDescription('Retry failed WeChat trade sync records'); } protected function execute(Input $input, Output $output) { $limit = intval($input->getOption('limit') ?: 50); $count = (new WxShippingService())->retryFailed($limit); $output->writeln('Retried ' . $count . ' sync record(s).'); } }