作者 刘锟

update

@@ -52,7 +52,7 @@ class ThumbProjectImage extends Command @@ -52,7 +52,7 @@ class ThumbProjectImage extends Command
52 } else { 52 } else {
53 //所有项目 53 //所有项目
54 $projectModel = new Project(); 54 $projectModel = new Project();
55 - $list = $projectModel->list(['delete_status' => 0, 'type' => ['in', [1, 2, 3, 4, 6]]], 'id', ['id'], 'asc'); 55 + $list = $projectModel->list(['id' => 2, 'delete_status' => 0, 'type' => ['in', [1, 2, 3, 4, 6]]], 'id', ['id'], 'asc');
56 foreach ($list as $k => $v) { 56 foreach ($list as $k => $v) {
57 $project_id = $v['id']; 57 $project_id = $v['id'];
58 58
@@ -65,8 +65,7 @@ class ThumbProjectImage extends Command @@ -65,8 +65,7 @@ class ThumbProjectImage extends Command
65 $thumb = $product->thumb; 65 $thumb = $product->thumb;
66 if (isset($thumb['url']) && $thumb['url']) { 66 if (isset($thumb['url']) && $thumb['url']) {
67 $thumb['url'] = thumbImageByUrl($thumb['url']); 67 $thumb['url'] = thumbImageByUrl($thumb['url']);
68 - $product->thumb = Arr::a2s($thumb);  
69 - $product->save(); 68 + Product::where(['id' => $product->id])->update(['thumb' => Arr::a2s($thumb)]);
70 } 69 }
71 } 70 }
72 }); 71 });