commit
d01debfc77
@ -498,6 +498,8 @@ class PurchaseProductOfferLogic extends BaseLogic
|
|||||||
$purchaseOffer = [];
|
$purchaseOffer = [];
|
||||||
$cartInfo = [];
|
$cartInfo = [];
|
||||||
foreach ($params['product_arr'] as $product) {
|
foreach ($params['product_arr'] as $product) {
|
||||||
|
$product['price'] = trim($product['price']);
|
||||||
|
$product['nums'] = trim($product['nums']);
|
||||||
if ($product['product_id'] <= 0) {
|
if ($product['product_id'] <= 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -542,7 +544,7 @@ class PurchaseProductOfferLogic extends BaseLogic
|
|||||||
BeforehandOrderCartInfo::insertAll($cartInfo);
|
BeforehandOrderCartInfo::insertAll($cartInfo);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Throwable $e) {
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
throw new BusinessException($e->getMessage());
|
throw new BusinessException($e->getMessage());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user