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