作者 lyh

gx

@@ -50,7 +50,7 @@ class UpdateProductCategory extends Command @@ -50,7 +50,7 @@ class UpdateProductCategory extends Command
50 public function handle(){ 50 public function handle(){
51 //获取所有项目 51 //获取所有项目
52 $projectModel = new Project(); 52 $projectModel = new Project();
53 - $list = $projectModel->list(['id'=>['in',[1]]],'id',['id']); 53 + $list = $projectModel->list(['id'=>['in',[1515]]],'id',['id']);
54 echo date('Y-m-d H:i:s') . ' start: ' . json_encode($list) . PHP_EOL; 54 echo date('Y-m-d H:i:s') . ' start: ' . json_encode($list) . PHP_EOL;
55 try { 55 try {
56 foreach ($list as $v) { 56 foreach ($list as $v) {
@@ -76,7 +76,7 @@ class UpdateProductCategory extends Command @@ -76,7 +76,7 @@ class UpdateProductCategory extends Command
76 */ 76 */
77 public function getUpdateProductCategory(){ 77 public function getUpdateProductCategory(){
78 $productModel = new Product(); 78 $productModel = new Product();
79 - $lists = $productModel->list(['deleted_at'=>['!=',null]],'id',['id','category_id']); 79 + $lists = $productModel->list(['deleted_at'=>null],'id',['id','category_id']);
80 foreach ($lists as $k => $v){ 80 foreach ($lists as $k => $v){
81 if(!empty($v['category_id'])){ 81 if(!empty($v['category_id'])){
82 $this->handleCategory($v['id'],$v['category_id']); 82 $this->handleCategory($v['id'],$v['category_id']);