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