35 lines
859 B
PHP
35 lines
859 B
PHP
<?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";
|
|
}
|
|
} |