diff --git a/app/api/lists/purchase_product_offer/PurchaseProductOfferLists.php b/app/api/lists/purchase_product_offer/PurchaseProductOfferLists.php index 3470eb21f..6a4cd723e 100644 --- a/app/api/lists/purchase_product_offer/PurchaseProductOfferLists.php +++ b/app/api/lists/purchase_product_offer/PurchaseProductOfferLists.php @@ -51,7 +51,7 @@ class PurchaseProductOfferLists extends BaseApiDataLists implements ListsSearchI return PurchaseProductOffer::where($this->searchWhere) ->field(['id', 'order_id', 'product_id', 'price', 'buyer_nums', 'unit', 'is_buyer', 'buyer_confirm','need_num', 'buyer_id', 'status', 'mark']) ->limit($this->limitOffset, $this->limitLength) - ->order(['id' => 'desc']) + ->order(['product_id'=>'desc','id' => 'desc']) ->select()->each(function($item){ $find=StoreProduct::where('id',$item->product_id)->find(); $item->store_name=$find->store_name;