Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
1 个修改的文件
包含
7 行增加
和
1 行删除
| @@ -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; |
-
请 注册 或 登录 后发表评论