|
@@ -55,8 +55,9 @@ class UpdateController extends BaseController |
|
@@ -55,8 +55,9 @@ class UpdateController extends BaseController |
|
55
|
$list = DB::connection('custom_mysql')->table('gl_product')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray();
|
55
|
$list = DB::connection('custom_mysql')->table('gl_product')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray();
|
|
56
|
if(!empty($list)){
|
56
|
if(!empty($list)){
|
|
57
|
foreach ($list as $v){
|
57
|
foreach ($list as $v){
|
|
|
|
58
|
+ $v = (array)$v;
|
|
58
|
if(!empty($v['seo_mate'])){
|
59
|
if(!empty($v['seo_mate'])){
|
|
59
|
- $seo_arr = $v['seo_mate'];
|
60
|
+ $seo_arr = json_decode($v['seo_mate'], true);
|
|
60
|
//更新seo_title
|
61
|
//更新seo_title
|
|
61
|
if(!isset($seo_arr['title'])){
|
62
|
if(!isset($seo_arr['title'])){
|
|
62
|
//生成seo_title
|
63
|
//生成seo_title
|
|
@@ -89,6 +90,7 @@ class UpdateController extends BaseController |
|
@@ -89,6 +90,7 @@ class UpdateController extends BaseController |
|
89
|
$list = DB::connection('custom_mysql')->table('gl_news')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray();
|
90
|
$list = DB::connection('custom_mysql')->table('gl_news')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray();
|
|
90
|
if(!empty($list)){
|
91
|
if(!empty($list)){
|
|
91
|
foreach ($list as $k => $v){
|
92
|
foreach ($list as $k => $v){
|
|
|
|
93
|
+ $v = (array)$v;
|
|
92
|
$data = [];
|
94
|
$data = [];
|
|
93
|
if(empty($v['seo_title'])){
|
95
|
if(empty($v['seo_title'])){
|
|
94
|
$data['seo_title'] = $this->ai_send('news_seo_title',$v['name']);
|
96
|
$data['seo_title'] = $this->ai_send('news_seo_title',$v['name']);
|
|
@@ -116,6 +118,7 @@ class UpdateController extends BaseController |
|
@@ -116,6 +118,7 @@ class UpdateController extends BaseController |
|
116
|
$list = DB::connection('custom_mysql')->table('gl_blog')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray();
|
118
|
$list = DB::connection('custom_mysql')->table('gl_blog')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray();
|
|
117
|
if(!empty($list)){
|
119
|
if(!empty($list)){
|
|
118
|
foreach ($list as $k => $v){
|
120
|
foreach ($list as $k => $v){
|
|
|
|
121
|
+ $v = (array)$v;
|
|
119
|
$data = [];
|
122
|
$data = [];
|
|
120
|
if(empty($v['seo_title'])){
|
123
|
if(empty($v['seo_title'])){
|
|
121
|
$data['seo_title'] = $this->ai_send('blog_seo_title',$v['name']);
|
124
|
$data['seo_title'] = $this->ai_send('blog_seo_title',$v['name']);
|