From fc4798fd07715c6e96e4e66e3d127629d52ecc3b Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 20 Nov 2024 17:05:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(api):=20=E4=B8=BA=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E6=8A=A5=E4=BB=B7=E5=88=97=E8=A1=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=AE=A2=E5=8D=95ID=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 PurchaseProductOfferListsTwo 类中添加了 order_id 字段 - 通过查询 BeforehandOrder 模型获取 store_id 并赋值给 order_id - 此修改使得 API 返回数据中包含订单ID信息,可能用于前端显示或后续处理 --- .../purchase_product_offer/PurchaseProductOfferListsTwo.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/api/lists/purchase_product_offer/PurchaseProductOfferListsTwo.php b/app/api/lists/purchase_product_offer/PurchaseProductOfferListsTwo.php index 3e9810f51..4c836530d 100644 --- a/app/api/lists/purchase_product_offer/PurchaseProductOfferListsTwo.php +++ b/app/api/lists/purchase_product_offer/PurchaseProductOfferListsTwo.php @@ -11,6 +11,7 @@ use app\common\model\store_product_unit\StoreProductUnit; use app\api\lists\BaseApiDataLists; use app\common\model\store_category\StoreCategory; use app\common\lists\ListsExcelInterface; +use app\common\model\beforehand_order\BeforehandOrder; use app\common\model\user\User; /** @@ -54,6 +55,7 @@ class PurchaseProductOfferListsTwo extends BaseApiDataLists implements ListsSear ->select()->each(function($item){ $find=StoreProduct::where('id',$item->product_id)->find(); $item->store_name=$find->store_name; + $item->order_id=BeforehandOrder::where('id',$item->order_id)->value('store_id'); $item->unit_name=StoreProductUnit::where('id',$item->unit)->value('name'); $item->category_name=StoreCategory::where('id',$find->top_cate_id)->value('name'); $item->buyer_name=DeliveryService::where('uid',$item->buyer_id)->value('nickname');