23 lines
508 B
PHP
23 lines
508 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace app\command;
|
||
|
|
|
||
|
|
use app\controller\Bus\PlugCharge;
|
||
|
|
use think\console\Command;
|
||
|
|
use think\console\Input;
|
||
|
|
use think\console\Output;
|
||
|
|
use think\facade\Db;
|
||
|
|
use think\facade\Log;
|
||
|
|
|
||
|
|
class TestTask extends Command
|
||
|
|
{
|
||
|
|
protected function configure()
|
||
|
|
{
|
||
|
|
$this->setName('test:task')->setDescription('Execute the reservation charging task');
|
||
|
|
}
|
||
|
|
|
||
|
|
protected function execute(Input $input, Output $output)
|
||
|
|
{
|
||
|
|
Db::table('test')->save(['number' => 1, 'message' => time()]);
|
||
|
|
}
|
||
|
|
}
|