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

35 lines
859 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 ClearHotValue extends Command
{
protected function configure()
{
$this->setName('clear-hot-value')
->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)
{
// $key_name = "admin:cli:clear_room_hot_value";
// redis_lock_exit($key_name);
$reslut = model('api/room')->clear_room_hot_value();
// redis_unlock($key_name);
echo date('Y-m-d H:i:s') . "清除房间当天热度 执行成功"." \r\n";
}
}