刮刮后端接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
693 B

<?php
namespace app\command;
use app\logic\Zone;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class Autousezone extends Command
{
protected function configure()
{
// 配置脚本命令的名称和描述
$this->setName('Autousezone')->setDescription('自动完成刮奖脚本');
}
protected function execute(Input $input, Output $output)
{
$count = $input->getOption('limit') ?? 500;
$user_id = $input->getOption('user_id') ?? 1;
$zone_goods_id = $input->getOption('zone_goods_id') ?? 1;
// 执行脚本逻辑
$output->writeln(Zone::auto($user_id,$zone_goods_id,$count));
}
}