|
...
|
...
|
@@ -4,12 +4,16 @@ namespace App\Console\Commands\Tdk; |
|
|
|
|
|
|
|
|
|
|
|
use App\Helper\Arr;
|
|
|
|
use App\Models\Blog\BlogCategory;
|
|
|
|
use App\Models\CustomModule\CustomModuleCategory;
|
|
|
|
use App\Models\News\News;
|
|
|
|
use App\Models\News\NewsCategory;
|
|
|
|
use App\Models\Product\Category;
|
|
|
|
use App\Models\Product\Keyword;
|
|
|
|
use App\Models\Project\KeywordPrefix;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Models\Project\ProjectUpdateTdk;
|
|
|
|
use App\Models\Template\BCustomTemplate;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use App\Utils\LogUtils;
|
|
|
|
use Illuminate\Console\Command;
|
|
...
|
...
|
@@ -55,11 +59,14 @@ class RerunSeoTdk extends Command |
|
|
|
*/
|
|
|
|
public function handle()
|
|
|
|
{
|
|
|
|
$project_ids = Project::where('type', Project::TYPE_TWO)->pluck('id')->toArray();
|
|
|
|
$where = [
|
|
|
|
'id' => 624
|
|
|
|
];
|
|
|
|
$project_ids = Project::where('type', Project::TYPE_TWO)->where($where)->pluck('id')->toArray();
|
|
|
|
foreach ($project_ids as $project_id){
|
|
|
|
try {
|
|
|
|
ProjectServer::useProject($project_id);
|
|
|
|
$this->judgeAnomalies($project_id);
|
|
|
|
$this->changeCompanyName($project_id);
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}catch (\Exception $e){
|
|
|
|
dump($e->getMessage());
|
|
...
|
...
|
@@ -68,6 +75,25 @@ class RerunSeoTdk extends Command |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 换了公司英文名的
|
|
|
|
* @author zbj
|
|
|
|
* @date 2025/7/18
|
|
|
|
*/
|
|
|
|
public function changeCompanyName($project_id){
|
|
|
|
$row1 = BCustomTemplate::where('description', 'like', '%BlueQ Biotechnology%')->update(['description' => '']);
|
|
|
|
$row2 = Category::where('seo_des', 'like', '%BlueQ Biotechnology%')->update(['seo_des' => '']);
|
|
|
|
$row3 = Keyword::where('seo_description', 'like', '%BlueQ Biotechnology%')->update(['seo_description' => '']);
|
|
|
|
$row4 = Keyword::where('keyword_content', 'like', '%BlueQ Biotechnology%')->update(['keyword_content' => '']);
|
|
|
|
$row5 = BlogCategory::where('seo_des', 'like', '%BlueQ Biotechnology%')->update(['seo_des' => '']);
|
|
|
|
$row6 = NewsCategory::where('seo_des', 'like', '%BlueQ Biotechnology%')->update(['seo_des' => '']);
|
|
|
|
$row7 = CustomModuleCategory::where('seo_description', 'like', '%BlueQ Biotechnology%')->update(['seo_description' => '']);
|
|
|
|
|
|
|
|
|
|
|
|
dump($row1,$row2,$row3,$row4,$row5,$row6,$row7);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 判断seo_title 前缀有wholesale或cheap或buy的词,后缀也有 manufacturer,factory,exporter,company
|
|
|
|
* 判断关键词最后一个词是前缀的词,前后缀都不拼
|
|
|
|
* @author zbj
|
...
|
...
|
|