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