From 52add5541a682af5aa284b18c78e1d805858fcc0 Mon Sep 17 00:00:00 2001 From: "674780036@qq.com" <674780036@qq.com> Date: Mon, 26 Feb 2024 00:45:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=94=80=E8=AE=A2=E5=8D=95=E5=8A=A0?= =?UTF-8?q?=E4=B8=8A=E6=94=B6=E8=B4=A7=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/model/dealer/Order.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/api/model/dealer/Order.php b/app/api/model/dealer/Order.php index 17443bda..4611a27b 100644 --- a/app/api/model/dealer/Order.php +++ b/app/api/model/dealer/Order.php @@ -24,6 +24,7 @@ use app\common\enum\{ order\ReceiptStatus as ReceiptStatusEnum, order\DeliveryStatus as DeliveryStatusEnum }; +use app\common\model\UserAddress as UserAddessModel; /** * 分销商订单模型 @@ -83,10 +84,11 @@ class Order extends DealerOrderModel ->paginate(15); // 数据整理 foreach ($list as &$item) { - $with = ['goods' => ['image'], 'extract_shop', 'delivery.express']; + $with = ['goods' => ['image'],'user','address']; $where = ['order_id' => $item['order_id']]; // 查询订单记录 $order_goods = OrderApiModel::detail($where, $with); + $address = UserAddessModel::where('address_id',$item['user']->address_id)->find(); // 我的佣金 $money = [ $item['first_user_id'] => $item['first_money'], @@ -94,6 +96,8 @@ class Order extends DealerOrderModel $item['third_user_id'] => $item['third_money'], ]; $item['goods'] = $order_goods['goods']; + $item['address_name'] =$address['name']; + $item['order_no'] = $item['order']['order_no']; $item['my_money'] = $money[$userId]; } return $list;