|
@@ -12,6 +12,7 @@ namespace App\Console\Commands\LyhTest; |
|
@@ -12,6 +12,7 @@ namespace App\Console\Commands\LyhTest; |
|
12
|
use App\Helper\Arr;
|
12
|
use App\Helper\Arr;
|
|
13
|
use App\Helper\Translate;
|
13
|
use App\Helper\Translate;
|
|
14
|
use App\Models\Ai\AiBlog;
|
14
|
use App\Models\Ai\AiBlog;
|
|
|
|
15
|
+use App\Models\Ai\AiBlogAuthor;
|
|
15
|
use App\Models\Blog\Blog;
|
16
|
use App\Models\Blog\Blog;
|
|
16
|
use App\Models\Com\WordCountry;
|
17
|
use App\Models\Com\WordCountry;
|
|
17
|
use App\Models\CustomModule\CustomModuleContent;
|
18
|
use App\Models\CustomModule\CustomModuleContent;
|
|
@@ -67,7 +68,7 @@ class UpdateRoute extends Command |
|
@@ -67,7 +68,7 @@ class UpdateRoute extends Command |
|
67
|
*/
|
68
|
*/
|
|
68
|
public function handle()
|
69
|
public function handle()
|
|
69
|
{
|
70
|
{
|
|
70
|
- return $this->getNullRoute();
|
71
|
+ return $this->getAiBlog();
|
|
71
|
}
|
72
|
}
|
|
72
|
|
73
|
|
|
73
|
/**
|
74
|
/**
|
|
@@ -77,16 +78,16 @@ class UpdateRoute extends Command |
|
@@ -77,16 +78,16 @@ class UpdateRoute extends Command |
|
77
|
* @method :post
|
78
|
* @method :post
|
|
78
|
* @time :2025/4/21 11:52
|
79
|
* @time :2025/4/21 11:52
|
|
79
|
*/
|
80
|
*/
|
|
80
|
- public function getNullRoute(){
|
81
|
+ public function getAiBlog(){
|
|
81
|
$projectModel = new Project();
|
82
|
$projectModel = new Project();
|
|
82
|
$lists = $projectModel->list(['delete_status' => 0,'extend_type'=>0,'type'=>['in',[1,2,3,4]]], 'id', ['id']);
|
83
|
$lists = $projectModel->list(['delete_status' => 0,'extend_type'=>0,'type'=>['in',[1,2,3,4]]], 'id', ['id']);
|
|
83
|
foreach ($lists as $val) {
|
84
|
foreach ($lists as $val) {
|
|
84
|
echo date('Y-m-d H:i:s') . '开始--项目的id:'. $val['id'] . PHP_EOL;
|
85
|
echo date('Y-m-d H:i:s') . '开始--项目的id:'. $val['id'] . PHP_EOL;
|
|
85
|
ProjectServer::useProject($val['id']);
|
86
|
ProjectServer::useProject($val['id']);
|
|
86
|
- $keywordModel = new Keyword();
|
|
|
|
87
|
- $info = $keywordModel->read(['route'=>'']);
|
|
|
|
88
|
- if($info !== false){
|
|
|
|
89
|
- echo '存在路由为空--项目id:'.$val['id'].PHP_EOL;
|
87
|
+ $aiBlogModel = new AiBlogAuthor();
|
|
|
|
88
|
+ $results = $aiBlogModel->whereColumn('new_title', '!=', 'seo_title')->get();
|
|
|
|
89
|
+ if(!$results){
|
|
|
|
90
|
+ echo '项目id:'.$val['id'].PHP_EOL;
|
|
90
|
}
|
91
|
}
|
|
91
|
DB::disconnect('custom_mysql');
|
92
|
DB::disconnect('custom_mysql');
|
|
92
|
}
|
93
|
}
|
|
@@ -151,7 +152,7 @@ class UpdateRoute extends Command |
|
@@ -151,7 +152,7 @@ class UpdateRoute extends Command |
|
151
|
* @method :post
|
152
|
* @method :post
|
|
152
|
* @time :2025/3/21 17:45
|
153
|
* @time :2025/3/21 17:45
|
|
153
|
*/
|
154
|
*/
|
|
154
|
- public function getAiBlog($project_id){
|
155
|
+ public function getAiBlogs($project_id){
|
|
155
|
$aiBlogModel = new AiBlog();
|
156
|
$aiBlogModel = new AiBlog();
|
|
156
|
$lists = $aiBlogModel->list(['updated_at'=>['<=','2025-03-21 00:00:00']]);
|
157
|
$lists = $aiBlogModel->list(['updated_at'=>['<=','2025-03-21 00:00:00']]);
|
|
157
|
if(!empty($lists)){
|
158
|
if(!empty($lists)){
|