You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
983 B
42 lines
983 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace app\command;
|
|
|
|
use app\model\ApiLogModel;
|
|
use think\console\Command;
|
|
use think\console\Input;
|
|
use think\console\Output;
|
|
use think\facade\Cache;
|
|
use think\facade\Log;
|
|
|
|
class TestCommand extends Command
|
|
{
|
|
protected function configure()
|
|
{
|
|
// 指令配置
|
|
$this->setName('test')
|
|
->setDescription('the test command');
|
|
}
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @param Input $input
|
|
* @param Output $output
|
|
* @return void
|
|
*/
|
|
protected function execute(Input $input, Output $output)
|
|
{
|
|
$cacheCode = Cache::store('redis')->keys('api_log');
|
|
dd($cacheCode);
|
|
$param['nation'] = '81';
|
|
$param['phone'] = '8057252138';
|
|
$mobile = $param['nation'] . ltrim($param['phone'], '0');
|
|
|
|
$smsKey = 'DB:USER:UNLOGIN:SMS_CODE:' . $mobile;
|
|
$cacheCode = Cache::store('redis')->get($smsKey);
|
|
dd($cacheCode);
|
|
|
|
}
|
|
}
|
|
|