hospital-applets-api/app/Command/getProductCommand.php
2023-03-14 19:46:45 +08:00

47 lines
954 B
PHP

<?php
declare(strict_types=1);
namespace App\Command;
use Hyperf\Command\Command as HyperfCommand;
use Hyperf\Command\Annotation\Command;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Input\InputArgument;
/**
* 更新处方平台商品
*/
#[Command]
class getProductCommand extends HyperfCommand
{
public function __construct(protected ContainerInterface $container)
{
parent::__construct('getProduct:command');
}
public function configure()
{
parent::configure();
$this->setDescription('获取处方平台商品数据');
}
// 主逻辑处理
public function handle()
{
$sign = $this->input->getArgument('sign');
$this->line($sign);
}
/**
* 参数设置
* @return array[]
*/
protected function getArguments(): array
{
return [
['sign', InputArgument::REQUIRED, '签名数据']
];
}
}