作者 周海龙

合并分支 'zhl' 到 'master'

Zhl



查看合并请求 !1068
@@ -332,6 +332,16 @@ class UpdateSeoTdk extends Command @@ -332,6 +332,16 @@ class UpdateSeoTdk extends Command
332 } 332 }
333 $data[$field] = $this->ai_send($prompt, $project_id, $table, $v['id']); 333 $data[$field] = $this->ai_send($prompt, $project_id, $table, $v['id']);
334 } 334 }
  335 + }
  336 + else if ($table == 'gl_product_keyword' && $field == 'seo_title') {
  337 + # TODO 聚合页seo title 特殊处理 前缀_1 . 关键词 . 后缀_2
  338 + $prefix = $this->getPrefixKeyword($project_id, 'prefix', 1);
  339 + $suffix = $this->getPrefixKeyword($project_id, 'suffix', 2);
  340 + if (empty($prefix) || empty($suffix))
  341 + continue;
  342 + $seo_title = $prefix . ' ' . $v[$this->topic_fields[$table]] . ' ' . $suffix;
  343 + $data[$field] = $seo_title;
  344 + $update[$table]['title']++;
335 } else { 345 } else {
336 //直接使用topic 346 //直接使用topic
337 if (count($field_arr) > 1) { 347 if (count($field_arr) > 1) {