正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
| @@ -156,11 +156,12 @@ class UpdateSeoTdk extends Command | @@ -156,11 +156,12 @@ class UpdateSeoTdk extends Command | ||
| 156 | $ai_commands = AiCommand::where('is_batch', 1)->select('key', 'scene', 'ai')->get()->toArray(); | 156 | $ai_commands = AiCommand::where('is_batch', 1)->select('key', 'scene', 'ai')->get()->toArray(); |
| 157 | $ai_commands = Arr::setValueToKey($ai_commands, 'key'); | 157 | $ai_commands = Arr::setValueToKey($ai_commands, 'key'); |
| 158 | foreach ($this->maps as $table => $map) { | 158 | foreach ($this->maps as $table => $map) { |
| 159 | - $update[$table] = ['total_page'=>0, 'title'=>0, 'keyword'=>0, 'des'=>0, 'created_at'=>date('Y-m-d H:i:s'),]; | ||
| 160 | - echo date('Y-m-d H:i:s') . '更新--' . $table . ': 项目id' . $project_id . PHP_EOL; | 159 | + $update[$table] = ['total_page'=>0, 'title'=>0, 'keyword'=>0, 'des'=>0, 'created_at'=>date('Y-m-d H:i:s')]; |
| 160 | + echo date('Y-m-d H:i:s') . '更新--' . $table . ': 项目id' . $project_id . PHP_EOL . $update[$table]; | ||
| 161 | $list = DB::connection('custom_mysql')->table($table)->get()->toArray(); | 161 | $list = DB::connection('custom_mysql')->table($table)->get()->toArray(); |
| 162 | if (!empty($list)) { | 162 | if (!empty($list)) { |
| 163 | foreach ($list as $v) { | 163 | foreach ($list as $v) { |
| 164 | + echo date('Y-m-d H:i:s') . $v; | ||
| 164 | $update[$table]['total_page']++; | 165 | $update[$table]['total_page']++; |
| 165 | $v = (array)$v; | 166 | $v = (array)$v; |
| 166 | echo date('Y-m-d H:i:s') . '更新--' . $table . ':id' . $v['id'] . PHP_EOL; | 167 | echo date('Y-m-d H:i:s') . '更新--' . $table . ':id' . $v['id'] . PHP_EOL; |
-
请 注册 或 登录 后发表评论