From 22ba0f70db011301e4c538543263e7ee7522d808 Mon Sep 17 00:00:00 2001 From: lewis <604446095@qq.com> Date: Thu, 6 Mar 2025 11:20:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A2=84=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=BD=95=E5=85=A5=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchase_product_offer/PurchaseProductOfferLogic.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php index 3e4c0ee5..0433816d 100644 --- a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php +++ b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php @@ -498,6 +498,8 @@ class PurchaseProductOfferLogic extends BaseLogic $purchaseOffer = []; $cartInfo = []; foreach ($params['product_arr'] as $product) { + $product['price'] = trim($product['price']); + $product['nums'] = trim($product['nums']); if ($product['product_id'] <= 0) { continue; } @@ -542,7 +544,7 @@ class PurchaseProductOfferLogic extends BaseLogic BeforehandOrderCartInfo::insertAll($cartInfo); Db::commit(); return true; - } catch (\Exception $e) { + } catch (\Throwable $e) { Db::rollback(); throw new BusinessException($e->getMessage()); }