作者 lyh

gx

@@ -162,8 +162,9 @@ class UpdateSeoTdk extends Command @@ -162,8 +162,9 @@ class UpdateSeoTdk extends Command
162 foreach ($this->maps as $table => $map) { 162 foreach ($this->maps as $table => $map) {
163 $update[$table] = ['total_page'=>0, 'title'=>0, 'keyword'=>0, 'des'=>0]; 163 $update[$table] = ['total_page'=>0, 'title'=>0, 'keyword'=>0, 'des'=>0];
164 echo date('Y-m-d H:i:s') . '更新--' . $table . ': 项目id' . $project_id . PHP_EOL . json_encode($update[$table]); 164 echo date('Y-m-d H:i:s') . '更新--' . $table . ': 项目id' . $project_id . PHP_EOL . json_encode($update[$table]);
165 - $list = DB::connection('custom_mysql')->table($table)->get()->toArray(); 165 + $list = DB::connection('custom_mysql')->table($table)->get();
166 if (!empty($list)) { 166 if (!empty($list)) {
  167 + $list = $list->toArray();
167 foreach ($list as $v) { 168 foreach ($list as $v) {
168 echo '打印数据:'.date('Y-m-d H:i:s') . $update[$table]['total_page'].PHP_EOL; 169 echo '打印数据:'.date('Y-m-d H:i:s') . $update[$table]['total_page'].PHP_EOL;
169 $update[$table]['total_page']++; 170 $update[$table]['total_page']++;