43 lines
973 B
PHP
43 lines
973 B
PHP
<?php
|
|
|
|
namespace app\admin\command;
|
|
|
|
use app\admin\controller\AmapTrait;
|
|
use app\admin\controller\AutoDispatchLogic;
|
|
use app\admin\model\Order;
|
|
use think\console\Command;
|
|
use think\console\Input;
|
|
use think\console\Output;
|
|
use think\Exception;
|
|
|
|
class Test extends Command
|
|
{
|
|
use AmapTrait;
|
|
|
|
protected function configure()
|
|
{
|
|
$this->setName('test')
|
|
->setDescription('批量生成区域名称的拼音');
|
|
}
|
|
|
|
protected function execute(Input $input, Output $output)
|
|
{
|
|
// $order = Order::where('id','>=',694)->select();
|
|
try {
|
|
$order = Order::get(5126);
|
|
AutoDispatchLogic::autoDispatch($order,null,true);
|
|
}catch (Exception $e){
|
|
$output->writeln('<error>' . $e->getMessage() . '</error>');
|
|
$output->writeln('<comment>' . $e->getFile() . ':' . $e->getLine() . '</comment>');
|
|
$output->writeln($e->getTraceAsString());
|
|
}
|
|
|
|
dd(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|