正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -83,8 +83,8 @@ class UpdateSeoTdk extends Command | @@ -83,8 +83,8 @@ class UpdateSeoTdk extends Command | ||
| 83 | $list = DB::connection('custom_mysql')->table('gl_product')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray(); | 83 | $list = DB::connection('custom_mysql')->table('gl_product')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray(); |
| 84 | if(!empty($list)){ | 84 | if(!empty($list)){ |
| 85 | foreach ($list as $v){ | 85 | foreach ($list as $v){ |
| 86 | - echo date('Y-m-d H:i:s') . ' updateProduct: ' . $v['id'] . PHP_EOL; | ||
| 87 | $v = (array)$v; | 86 | $v = (array)$v; |
| 87 | + echo date('Y-m-d H:i:s') . ' updateProduct: ' . $v['id'] . PHP_EOL; | ||
| 88 | $seo_arr = json_decode($v['seo_mate'], true) ?: []; | 88 | $seo_arr = json_decode($v['seo_mate'], true) ?: []; |
| 89 | //更新seo_title | 89 | //更新seo_title |
| 90 | if(!isset($seo_arr['title']) || empty($seo_arr['title'])){ | 90 | if(!isset($seo_arr['title']) || empty($seo_arr['title'])){ |
| @@ -125,8 +125,8 @@ class UpdateSeoTdk extends Command | @@ -125,8 +125,8 @@ class UpdateSeoTdk extends Command | ||
| 125 | $list = DB::connection('custom_mysql')->table('gl_product_category')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray(); | 125 | $list = DB::connection('custom_mysql')->table('gl_product_category')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray(); |
| 126 | if(!empty($list)){ | 126 | if(!empty($list)){ |
| 127 | foreach ($list as $v){ | 127 | foreach ($list as $v){ |
| 128 | - echo date('Y-m-d H:i:s') . ' updateProductCate: ' . $v['id'] . PHP_EOL; | ||
| 129 | $v = (array)$v; | 128 | $v = (array)$v; |
| 129 | + echo date('Y-m-d H:i:s') . ' updateProductCate: ' . $v['id'] . PHP_EOL; | ||
| 130 | $data = []; | 130 | $data = []; |
| 131 | if(empty($v['seo_title'])){ | 131 | if(empty($v['seo_title'])){ |
| 132 | $aiCommandModel = new AiCommand(); | 132 | $aiCommandModel = new AiCommand(); |
| @@ -167,8 +167,8 @@ class UpdateSeoTdk extends Command | @@ -167,8 +167,8 @@ class UpdateSeoTdk extends Command | ||
| 167 | $list = DB::connection('custom_mysql')->table('gl_news')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray(); | 167 | $list = DB::connection('custom_mysql')->table('gl_news')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray(); |
| 168 | if(!empty($list)){ | 168 | if(!empty($list)){ |
| 169 | foreach ($list as $k => $v){ | 169 | foreach ($list as $k => $v){ |
| 170 | - echo date('Y-m-d H:i:s') . ' updateNews: ' . $v['id'] . PHP_EOL; | ||
| 171 | $v = (array)$v; | 170 | $v = (array)$v; |
| 171 | + echo date('Y-m-d H:i:s') . ' updateNews: ' . $v['id'] . PHP_EOL; | ||
| 172 | $data = []; | 172 | $data = []; |
| 173 | if(empty($v['seo_title'])){ | 173 | if(empty($v['seo_title'])){ |
| 174 | $aiCommandModel = new AiCommand(); | 174 | $aiCommandModel = new AiCommand(); |
-
请 注册 或 登录 后发表评论