正在显示
1 个修改的文件
包含
2 行增加
和
3 行删除
| @@ -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 | }); |
-
请 注册 或 登录 后发表评论