修复异常
This commit is contained in:
parent
de6cea16ac
commit
20e0f50e54
@ -110,11 +110,10 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
throw new ValidateException('转售商品数据异常');
|
||||
}
|
||||
$community = Db::name('Community')->where('community_id', $communityIdArray[0] ?? 0)->field('community_id, title, image')->fetchSql(false)->find();
|
||||
if (!$community) {
|
||||
throw new ValidateException('转售商品数据异常');
|
||||
if ($community) {
|
||||
$deliverMethod = Db::name('resale')->where('community_id', $communityIdArray[0] ?? 0)->value('deliver_method');
|
||||
$deliverMethodArray = explode(',', $deliverMethod);
|
||||
}
|
||||
$deliverMethod = Db::name('resale')->where('community_id', $communityIdArray[0] ?? 0)->value('deliver_method');
|
||||
$deliverMethodArray = explode(',', $deliverMethod);
|
||||
}
|
||||
unset($merchantCart, $cart);
|
||||
$order_price = 0;
|
||||
@ -137,8 +136,8 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
$order_svip_discount = 0;
|
||||
// 循环计算每个店铺的订单数据
|
||||
foreach ($merchantCartList as &$merchantCart) {
|
||||
if ($order_type == 98) {
|
||||
$merchantCart['delivery_way'] = $deliverMethodArray ?? [];
|
||||
if ($order_type == 98 && !empty($deliverMethodArray)) {
|
||||
$merchantCart['delivery_way'] = $deliverMethodArray;
|
||||
}
|
||||
$postageRule = [];
|
||||
$total_price = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user