|
...
|
...
|
@@ -12,6 +12,7 @@ use App\Models\Domain\DomainInfo; |
|
|
|
use App\Models\Mail\Mail;
|
|
|
|
use App\Models\Project\DeployBuild;
|
|
|
|
use App\Models\Project\DeployOptimize;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Models\Project\ProjectKeyword;
|
|
|
|
use App\Models\Project\ProjectUpdateTdk;
|
|
|
|
use App\Models\User\User;
|
|
...
|
...
|
@@ -263,6 +264,7 @@ class UpdateSeoTdk extends Command |
|
|
|
public function seo_tdk($project_id, $task_id)
|
|
|
|
{
|
|
|
|
$notify_master = $notify_keyword = false;
|
|
|
|
$project = Project::find($project_id);
|
|
|
|
//更新统计
|
|
|
|
$update = [];
|
|
|
|
//AI指令 是否有定制指令
|
|
...
|
...
|
@@ -366,15 +368,20 @@ class UpdateSeoTdk extends Command |
|
|
|
}
|
|
|
|
} else if ($table == 'gl_product_keyword' && $field == 'seo_title') {
|
|
|
|
# TODO 聚合页seo title 特殊处理 前缀_1 . 关键词 . 后缀_2
|
|
|
|
$prefix = $this->getPrefixKeyword($project_id, 'prefix', 1);
|
|
|
|
$suffix = $this->getPrefixKeyword($project_id, 'suffix', 2);
|
|
|
|
if (empty($prefix) || empty($suffix)){
|
|
|
|
continue;
|
|
|
|
$seo_title = '';
|
|
|
|
//只有推广项目才加 前后缀
|
|
|
|
if($project->type == Project::TYPE_TWO) {
|
|
|
|
$prefix = $this->getPrefixKeyword($project_id, 'prefix', 1);
|
|
|
|
$suffix = $this->getPrefixKeyword($project_id, 'suffix', 2);
|
|
|
|
if (empty($prefix) || empty($suffix)) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
$prefix = $this->getPrefixKeyword($project_id, 'prefix', 1, $v[$this->topic_fields[$table]]);
|
|
|
|
$suffix = $this->getPrefixKeyword($project_id, 'suffix', 2, $v[$this->topic_fields[$table]]);
|
|
|
|
$seo_title = $prefix . ' ' . $v[$this->topic_fields[$table]] . ' ' . $suffix;
|
|
|
|
}
|
|
|
|
|
|
|
|
$prefix = $this->getPrefixKeyword($project_id, 'prefix', 1, $v[$this->topic_fields[$table]]);
|
|
|
|
$suffix = $this->getPrefixKeyword($project_id, 'suffix', 2, $v[$this->topic_fields[$table]]);
|
|
|
|
$seo_title = $prefix . ' ' . $v[$this->topic_fields[$table]] . ' ' . $suffix;
|
|
|
|
$data[$field] = trim($seo_title);
|
|
|
|
$update[$table]['title']++;
|
|
|
|
} else if ($table == 'gl_ai_blog_list' && $field == 'seo_title') {
|
...
|
...
|
|