作者 lyh
... ... @@ -123,6 +123,9 @@ class UpdateSeoTdk extends Command
if(empty($v['seo_description'])){
$data['seo_description'] = $this->ai_send('news_seo_description',$v['name']);
}
if(!$data){
continue;
}
DB::connection('custom_mysql')->table('gl_news')->where(['id'=>$v['id']])->update($data);
}
}
... ... @@ -151,7 +154,10 @@ class UpdateSeoTdk extends Command
if(empty($v['seo_description'])){
$data['seo_description'] = $this->ai_send('blog_seo_description',$v['name']);
}
DB::connection('custom_mysql')->table('gl_product')->where(['id'=>$v['id']])->update($data);
if(!$data){
continue;
}
DB::connection('custom_mysql')->table('gl_blog')->where(['id'=>$v['id']])->update($data);
}
}
return true;
... ...