|
@@ -17,6 +17,7 @@ use App\Models\Blog\Blog; |
|
@@ -17,6 +17,7 @@ use App\Models\Blog\Blog; |
|
17
|
use App\Models\Com\WordCountry;
|
17
|
use App\Models\Com\WordCountry;
|
|
18
|
use App\Models\CustomModule\CustomModuleContent;
|
18
|
use App\Models\CustomModule\CustomModuleContent;
|
|
19
|
use App\Models\GoogleSearch\GoogleCodeCountry;
|
19
|
use App\Models\GoogleSearch\GoogleCodeCountry;
|
|
|
|
20
|
+use App\Models\News\News;
|
|
20
|
use App\Models\Product\CategoryRelated;
|
21
|
use App\Models\Product\CategoryRelated;
|
|
21
|
use App\Models\Product\Keyword;
|
22
|
use App\Models\Product\Keyword;
|
|
22
|
use App\Models\Product\Product;
|
23
|
use App\Models\Product\Product;
|
|
@@ -68,7 +69,26 @@ class UpdateRoute extends Command |
|
@@ -68,7 +69,26 @@ class UpdateRoute extends Command |
|
68
|
*/
|
69
|
*/
|
|
69
|
public function handle()
|
70
|
public function handle()
|
|
70
|
{
|
71
|
{
|
|
71
|
- return $this->_action();
|
72
|
+
|
|
|
|
73
|
+ }
|
|
|
|
74
|
+
|
|
|
|
75
|
+ /**
|
|
|
|
76
|
+ * @remark :更新新闻路由
|
|
|
|
77
|
+ * @name :updateNewsRoute
|
|
|
|
78
|
+ * @author :lyh
|
|
|
|
79
|
+ * @method :post
|
|
|
|
80
|
+ * @time :2025/9/19 11:05
|
|
|
|
81
|
+ */
|
|
|
|
82
|
+ public function updateNewsRoute()
|
|
|
|
83
|
+ {
|
|
|
|
84
|
+ ProjectServer::useProject(1234);
|
|
|
|
85
|
+ $newsModel = new News();
|
|
|
|
86
|
+ $lists = $newsModel->list(['status'=>1],'id',['id','url']);
|
|
|
|
87
|
+ foreach ($lists as $item) {
|
|
|
|
88
|
+ $route = RouteMap::setRoute($item['url'], RouteMap::SOURCE_NEWS, $item['id'],1234);
|
|
|
|
89
|
+ $newsModel->edit(['url'=>$route],['id'=>$item['id']]);
|
|
|
|
90
|
+ }
|
|
|
|
91
|
+ DB::disconnect('custom_mysql');
|
|
72
|
}
|
92
|
}
|
|
73
|
|
93
|
|
|
74
|
/**
|
94
|
/**
|