feat : order list

This commit is contained in:
2025-04-08 15:22:31 +08:00
parent eb134e4165
commit 35abf99854
2 changed files with 2 additions and 2 deletions

View File

@@ -173,7 +173,7 @@ class GoodCache
foreach ($list as &$item) {
$item['sku_list'] = $skuListArr[$item['id']] ?? [];
$item['image_list'] = $imageArr[$item['id']] ?? [];
$item['price'] = min($price[$item['id']]) ?? 0;
$item['price'] = !empty($price[$item['id']]) ? (min($price[$item['id']]) ?? 0) : 0;
}
return $list;

View File

@@ -90,7 +90,7 @@ class Sku extends Model
->where('is_del',GoodCode::SKU_IS_NO_DEL)
->where('saleable',GoodCode::LISTING)
->orderBy('sort')
->select(['id','spu_id','title','image_ids','price','param','extra','total_stock','surplus_stock','order_num','is_add_staple_food','occupied'])
->select(['id','spu_id','title','image_ids','price','param','extra','total_stock','surplus_stock','order_num','is_add_staple_food','occupied','chef_id'])
->get();
}