初始化代码
This commit is contained in:
35
application/common/command/ClearHotValue.php
Normal file
35
application/common/command/ClearHotValue.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user