Files
mier-php/application/common/command/ControlBox.php

37 lines
833 B
PHP
Raw Normal View History

2025-08-11 10:22:05 +08:00
<?php
namespace app\common\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class ControlBox extends Command
{
protected function configure()
{
$this->setName('control-box')
->setDescription('奖池监控'); //
}
/**
* 清理过期装扮
* @param Input $input
* @param Output $output
* @return int|void|null
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
protected function execute(Input $input, Output $output)
{
while (true) {
sleep(2);
$tid = input('tid', 0);
$is_reset = input('is_reset', 0);
$reslut = model('admin/box')->control_generate_box($tid, $is_reset);
echo '奖池监控成功!'.PHP_EOL;
}
}
}