作者 lyh

更新脚本

@@ -66,7 +66,7 @@ class UpdateRoute extends Command @@ -66,7 +66,7 @@ class UpdateRoute extends Command
66 // $this->getBlog(); 66 // $this->getBlog();
67 // $this->setCustomRoute($v['id']); 67 // $this->setCustomRoute($v['id']);
68 $this->editProductAlt(); 68 $this->editProductAlt();
69 - $this->custom_to_blogs(); 69 +// $this->custom_to_blogs();
70 DB::disconnect('custom_mysql'); 70 DB::disconnect('custom_mysql');
71 } 71 }
72 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; 72 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
@@ -110,8 +110,10 @@ class UpdateRoute extends Command @@ -110,8 +110,10 @@ class UpdateRoute extends Command
110 $productModel = new Product(); 110 $productModel = new Product();
111 $lists = $productModel->list(['status'=>1],'id',['id','route','thumb','gallery']); 111 $lists = $productModel->list(['status'=>1],'id',['id','route','thumb','gallery']);
112 foreach ($lists as $k => $v){ 112 foreach ($lists as $k => $v){
113 - $v['seo_mate']['title'] = '';  
114 - $productModel->edit(['seo_mate'=>json_encode($v['seo_mate'],true)],['id'=>$v['id']]); 113 + $seo_mate = $v['seo_mate'];
  114 + $seo_mate['title'] = '';
  115 + echo date('Y-m-d H:i:s') . ':'.json_encode($seo_mate) . PHP_EOL;
  116 + $productModel->edit(['seo_mate'=>json_encode($seo_mate,true)],['id'=>$v['id']]);
115 } 117 }
116 return true; 118 return true;
117 } 119 }