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