信用购订单支持多商品

This commit is contained in:
luofei 2023-07-07 11:07:41 +08:00
parent 75e69d505e
commit 13884d15ca

View File

@ -929,7 +929,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
$extend = [];
}
$orderType = $orderInfo['order_type'];
if ($orderType != 0 && (count($orderInfo['order']) > 1 || ($orderType != 10 && count($orderInfo['order'][0]['list']) > 1))) {
if (!in_array($orderType, [0, 98]) && (count($orderInfo['order']) > 1 || ($orderType != 10 && count($orderInfo['order'][0]['list']) > 1))) {
throw new ValidateException('活动商品请单独购买');
}
@ -954,6 +954,9 @@ class StoreOrderCreateRepository extends StoreOrderRepository
}
}
}
if ($orderType == 98 && count($merchantCartList) > 1) {
throw new ValidateException('采购商品不支持跨店购买');
}
if ($hasTake) {
app()->make(UserAddressValidate::class)->scene('take')->check($post);
}