init
This commit is contained in:
23
app/command/TestTask.php
Normal file
23
app/command/TestTask.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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()]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user