|
...
|
...
|
@@ -11,6 +11,7 @@ namespace App\Console\Commands\Test; |
|
|
|
|
|
|
|
use App\Helper\Arr;
|
|
|
|
use App\Helper\Translate;
|
|
|
|
use App\Models\Blog\Blog;
|
|
|
|
use App\Models\CustomModule\CustomModuleCategory;
|
|
|
|
use App\Models\Product\CategoryRelated;
|
|
|
|
use App\Models\Product\Keyword;
|
|
...
|
...
|
@@ -60,7 +61,8 @@ class UpdateRoute extends Command |
|
|
|
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
|
|
|
|
ProjectServer::useProject($v['id']);
|
|
|
|
// $this->getProduct();
|
|
|
|
$this->setProductKeyword();
|
|
|
|
// $this->setProductKeyword();
|
|
|
|
$this->getBlog();
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
|
|
...
|
...
|
@@ -386,4 +388,14 @@ class UpdateRoute extends Command |
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getBlog(){
|
|
|
|
$blogModel = new Blog();
|
|
|
|
$lists = $blogModel->list();
|
|
|
|
foreach ($lists as $v){
|
|
|
|
$route = RouteMap::setRoute($v['name'], RouteMap::SOURCE_BLOG, $v['id'], 1462);
|
|
|
|
$blogModel->edit(['url'=>$route],['id'=>$v['id']]);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|