|
...
|
...
|
@@ -17,6 +17,7 @@ use App\Models\Blog\Blog; |
|
|
|
use App\Models\Com\WordCountry;
|
|
|
|
use App\Models\CustomModule\CustomModuleContent;
|
|
|
|
use App\Models\GoogleSearch\GoogleCodeCountry;
|
|
|
|
use App\Models\News\News;
|
|
|
|
use App\Models\Product\CategoryRelated;
|
|
|
|
use App\Models\Product\Keyword;
|
|
|
|
use App\Models\Product\Product;
|
|
...
|
...
|
@@ -68,7 +69,26 @@ class UpdateRoute extends Command |
|
|
|
*/
|
|
|
|
public function handle()
|
|
|
|
{
|
|
|
|
return $this->_action();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :更新新闻路由
|
|
|
|
* @name :updateNewsRoute
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/9/19 11:05
|
|
|
|
*/
|
|
|
|
public function updateNewsRoute()
|
|
|
|
{
|
|
|
|
ProjectServer::useProject(1234);
|
|
|
|
$newsModel = new News();
|
|
|
|
$lists = $newsModel->list(['status'=>1],'id',['id','url']);
|
|
|
|
foreach ($lists as $item) {
|
|
|
|
$route = RouteMap::setRoute($item['url'], RouteMap::SOURCE_NEWS, $item['id'],1234);
|
|
|
|
$newsModel->edit(['url'=>$route],['id'=>$item['id']]);
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|