作者 lyh

gx

@@ -492,6 +492,14 @@ class OptimizeController extends BaseController @@ -492,6 +492,14 @@ class OptimizeController extends BaseController
492 $this->processChunkedList($productCategoryModel, ['status' => $productCategoryModel::STATUS_ACTIVE], ['id', 'title', 'route'], $domain, $data, 'product_category'); 492 $this->processChunkedList($productCategoryModel, ['status' => $productCategoryModel::STATUS_ACTIVE], ['id', 'title', 'route'], $domain, $data, 'product_category');
493 $productKeywordModel = new Keyword(); 493 $productKeywordModel = new Keyword();
494 $this->processChunkedList($productKeywordModel, ['status' => $productKeywordModel::STATUS_ACTIVE], ['id', 'title', 'route'], $domain, $data, 'product_keyword'); 494 $this->processChunkedList($productKeywordModel, ['status' => $productKeywordModel::STATUS_ACTIVE], ['id', 'title', 'route'], $domain, $data, 'product_keyword');
  495 + $aiBlogModel = new AiBlog();
  496 + $list = $aiBlogModel->list(['route'=>['!=',null]],'id',['route','new_title']);
  497 + if(!empty($list)){
  498 + $DomainInfo['domain'] = $DomainInfo['domain'] ?? '';
  499 + foreach ($list as $v){
  500 + $data['ai_blog'][] = ('https://'.$DomainInfo['domain'].'/') . 'blog/' . $v['route'] . '/{' . $v['new_title'] . '}';
  501 + }
  502 + }
495 DB::disconnect('custom_mysql'); 503 DB::disconnect('custom_mysql');
496 $this->response('success', Code::SUCCESS, $data); 504 $this->response('success', Code::SUCCESS, $data);
497 } 505 }