From 665eb57c5ee03d724ce2568d99c2b87e29a04d85 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Mon, 29 Jan 2024 14:03:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95=E7=BA=A2?= =?UTF-8?q?=E5=8C=85=E9=87=91=E9=A2=9D=E5=88=86=E9=85=8D=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/store/consumption/StoreConsumptionUserDao.php | 2 +- app/common/repositories/store/order/StoreCartRepository.php | 1 + .../repositories/store/order/StoreOrderCreateRepository.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/common/dao/store/consumption/StoreConsumptionUserDao.php b/app/common/dao/store/consumption/StoreConsumptionUserDao.php index 646c7cf8..d89aef54 100755 --- a/app/common/dao/store/consumption/StoreConsumptionUserDao.php +++ b/app/common/dao/store/consumption/StoreConsumptionUserDao.php @@ -350,7 +350,7 @@ class StoreConsumptionUserDao extends BaseDao $groupOrderTotalPrice = $this->groupOrderTotalPrice * 100; $consumptionBalance = $this->consumptionTotalAmount * 100; $rate = bcdiv($orderTotalPrice, $groupOrderTotalPrice, 5); - if ($consumptionBalance >= $orderTotalPrice) { + if ($consumptionBalance >= $groupOrderTotalPrice) { $useAmount = $orderTotalPrice; } else { $useAmount = $this->isLast ? $consumptionBalance : ceil(bcmul($consumptionBalance, $rate, 5)); diff --git a/app/common/repositories/store/order/StoreCartRepository.php b/app/common/repositories/store/order/StoreCartRepository.php index 06b0d220..8c1ff748 100755 --- a/app/common/repositories/store/order/StoreCartRepository.php +++ b/app/common/repositories/store/order/StoreCartRepository.php @@ -58,6 +58,7 @@ class StoreCartRepository extends BaseRepository public function checkCartList($res, $hasCoupon = 0, $user = null) { $arr = $fail = []; + /** @var ProductRepository $product_make */ $product_make = app()->make(ProductRepository::class); $svip_status = ($user && $user->is_svip > 0 && systemConfig('svip_switch_status')) ? true : false; foreach ($res as $item) { diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index e08b60a7..d853e6d1 100755 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -53,6 +53,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository $addressRepository = app()->make(UserAddressRepository::class); $address = $addressRepository->getWhere(['uid' => $uid, 'address_id' => $addressId]); } + /** @var StoreCartRepository $storeCartRepository */ $storeCartRepository = app()->make(StoreCartRepository::class); $res = $storeCartRepository->checkCartList($storeCartRepository->cartIbByData($cartId, $uid, $address), 0, $user); $merchantCartList = $res['list'];