From 081c89442cbd6da3db074210d542e0caf7eb198f Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 2 Aug 2024 20:30:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(OrderLogic):=20=E4=BF=AE=E6=94=B9=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BC=98=E5=8C=96=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=A4=84=E7=90=86=E6=B5=81=E7=A8=8B=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=95=86=E5=93=81=E5=AD=97=E6=AE=B5=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/order/OrderLogic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 1cdece94..b7967434 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -83,7 +83,7 @@ class OrderLogic extends BaseLogic self::$fresh_price = 0; //生鲜金额 /** 计算价格 */ $off_activity = Config::where('name', 'off_activity')->value('value'); - $field = 'id,store_name,image,unit,price,vip_price,cost,purchase,product_id,top_cate_id,store_info,rose'; + $field = 'id,store_name,image,unit,price,vip_price,cost,purchase,top_cate_id,store_info,rose'; foreach ($cart_select as $k => $v) { $find = StoreProduct::where(['id' => $v['product_id']])->field($field)->find(); if (!$find) { @@ -115,7 +115,7 @@ class OrderLogic extends BaseLogic $deduction_price = bcsub($cart_select[$k]['total_price'], $cart_select[$k]['pay_price'], 2); $cart_select[$k]['deduction_price'] = $deduction_price; //抵扣金额 } - $cart_select[$k]['product_id'] = $find['product_id']; + $cart_select[$k]['product_id'] = $find['id']; $cart_select[$k]['old_cart_id'] = $v['id']; $cart_select[$k]['cart_num'] = $v['cart_num']; $cart_select[$k]['verify_code'] = $params['verify_code'] ?? '';