作者 lyh
@@ -123,6 +123,9 @@ class UpdateSeoTdk extends Command @@ -123,6 +123,9 @@ class UpdateSeoTdk extends Command
123 if(empty($v['seo_description'])){ 123 if(empty($v['seo_description'])){
124 $data['seo_description'] = $this->ai_send('news_seo_description',$v['name']); 124 $data['seo_description'] = $this->ai_send('news_seo_description',$v['name']);
125 } 125 }
  126 + if(!$data){
  127 + continue;
  128 + }
126 DB::connection('custom_mysql')->table('gl_news')->where(['id'=>$v['id']])->update($data); 129 DB::connection('custom_mysql')->table('gl_news')->where(['id'=>$v['id']])->update($data);
127 } 130 }
128 } 131 }
@@ -151,7 +154,10 @@ class UpdateSeoTdk extends Command @@ -151,7 +154,10 @@ class UpdateSeoTdk extends Command
151 if(empty($v['seo_description'])){ 154 if(empty($v['seo_description'])){
152 $data['seo_description'] = $this->ai_send('blog_seo_description',$v['name']); 155 $data['seo_description'] = $this->ai_send('blog_seo_description',$v['name']);
153 } 156 }
154 - DB::connection('custom_mysql')->table('gl_product')->where(['id'=>$v['id']])->update($data); 157 + if(!$data){
  158 + continue;
  159 + }
  160 + DB::connection('custom_mysql')->table('gl_blog')->where(['id'=>$v['id']])->update($data);
155 } 161 }
156 } 162 }
157 return true; 163 return true;