feat : order list
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user