37 lines
884 B
PHP
37 lines
884 B
PHP
<?php
|
|
|
|
|
|
namespace app\common\command;
|
|
|
|
|
|
use think\console\Command;
|
|
use think\console\Input;
|
|
use think\console\Output;
|
|
|
|
class CloseRoomPrivacyStatus extends Command
|
|
{
|
|
protected function configure()
|
|
{
|
|
$this->setName('close-room-privacy-status')
|
|
->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(1);
|
|
$tid = input('tid', 0);
|
|
$is_reset = input('is_reset', 0);
|
|
$reslut = model('api/DatingRoom')->close_room_privacy_status();
|
|
echo '定时清理到期私密小屋!'.PHP_EOL;
|
|
}
|
|
}
|
|
} |