修改预订单录入的错误

This commit is contained in:
lewis 2025-03-06 11:20:04 +08:00
parent a3e1660e45
commit 22ba0f70db

View File

@ -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());
}