From 1e37ca795d09a5e0b9a7f9acaf8fe4e49de62efe Mon Sep 17 00:00:00 2001 From: codeliu <1873441552@qq.com> Date: Fri, 22 Mar 2024 15:50:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E4=B8=BB=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/order/StoreOrderCreateRepository.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index ea8ede45..ac18f171 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -1091,6 +1091,14 @@ class StoreOrderCreateRepository extends StoreOrderRepository } $user_address = isset($address) ? ($address['province'] . $address['city'] . $address['district'] . $address['street'] . $address['detail']) : ''; //整理订单数据 + $payPrice_order = $merchantCart['order']['pay_price']; + $couponPrice_order = bcadd($merchantCart['order']['coupon_price'], $merchantCart['order']['platform_coupon_price'], 2); + if($remarkMoney){ + $payPrice_order = $remarkMoney;//输入得金额 + $couponPrice_order = $merchantCart['order']['pay_price'] -$payPrice_order; + } + + $_order = [ 'cartInfo' => $merchantCart, 'activity_type' => $orderInfo['order_type'], @@ -1113,7 +1121,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository 'total_postage' => $merchantCart['order']['postage_price'], 'pay_postage' => $merchantCart['order']['postage_price'], 'svip_discount' => $merchantCart['order']['svip_discount'], - 'pay_price' => $merchantCart['order']['pay_price'], + 'pay_price' =>$payPrice_order, 'integral' => $merchantCart['order']['total_integral'], 'integral_price' => $merchantCart['order']['total_integral_price'], 'give_integral' => $merchantCart['order']['total_give_integral'], @@ -1122,7 +1130,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository 'order_extend' => count($order_extend) ? json_encode($order_extend, JSON_UNESCAPED_UNICODE) : '', 'coupon_id' => implode(',', $merchantCart['order']['useCouponIds']), 'mark' => $mark[$merchantCart['mer_id']] ?? '', - 'coupon_price' => bcadd($merchantCart['order']['coupon_price'], $merchantCart['order']['platform_coupon_price'], 2), + 'coupon_price' => $couponPrice_order, 'platform_coupon_price' => $merchantCart['order']['platform_coupon_price'], 'pay_type' => $pay_type, 'refund_switch' => $merchantCart['order']['order_refund_switch'], From 76dab72a8e6bba759f07aaebff88ee4f3b4f8616 Mon Sep 17 00:00:00 2001 From: codeliu <1873441552@qq.com> Date: Fri, 22 Mar 2024 16:22:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=89=AB=E7=A0=81=E6=8F=90=E8=B4=A7?= =?UTF-8?q?=E9=99=90=E5=88=B6=E8=B4=AD=E7=89=A9=E8=BD=A6=E4=BC=9A=E6=9C=89?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/order/StoreOrder.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/controller/api/store/order/StoreOrder.php b/app/controller/api/store/order/StoreOrder.php index 859bd3e9..76867ffa 100644 --- a/app/controller/api/store/order/StoreOrder.php +++ b/app/controller/api/store/order/StoreOrder.php @@ -331,14 +331,17 @@ class StoreOrder extends BaseController //初始化 return app('json')->success($this->repository->beginMerchant($merId)); } - + //购物车有检测机制 $where = [ "a.mer_id" => $merId, - "p.is_show" => 1, - "p.status" => 1, - "p.is_gift_bag" => 0 + "p.is_show" => 1, // 上架 + "p.is_used" => 1,// 显示 + "p.product_type" => 0,// 普通商品 + "p.status" => 1, // 审核通过 + "p.is_gift_bag" => 0 //不是礼包 ]; + return app('json')->success($this->repository->dealGoodsList($where,$money,$merId)); }