更新转售订单送货方式
This commit is contained in:
parent
5493e16daf
commit
af10861443
@ -113,6 +113,8 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
if (!$community) {
|
if (!$community) {
|
||||||
throw new ValidateException('转售商品数据异常');
|
throw new ValidateException('转售商品数据异常');
|
||||||
}
|
}
|
||||||
|
$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;
|
||||||
@ -135,6 +137,9 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
$order_svip_discount = 0;
|
$order_svip_discount = 0;
|
||||||
// 循环计算每个店铺的订单数据
|
// 循环计算每个店铺的订单数据
|
||||||
foreach ($merchantCartList as &$merchantCart) {
|
foreach ($merchantCartList as &$merchantCart) {
|
||||||
|
if ($order_type == 98) {
|
||||||
|
$merchantCart['delivery_way'] = $deliverMethodArray ?? [];
|
||||||
|
}
|
||||||
$postageRule = [];
|
$postageRule = [];
|
||||||
$total_price = 0;
|
$total_price = 0;
|
||||||
$total_num = 0;
|
$total_num = 0;
|
||||||
@ -164,6 +169,10 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
$product_cart = [];
|
$product_cart = [];
|
||||||
|
|
||||||
foreach ($merchantCart['list'] as $k => $cart) {
|
foreach ($merchantCart['list'] as $k => $cart) {
|
||||||
|
//处理转售送货方式
|
||||||
|
if ($order_type == 98) {
|
||||||
|
$merchantCart['list'][$k]['product']['delivery_way'] = $cart['product']['delivery_way'] = $deliverMethod ?? '';
|
||||||
|
}
|
||||||
//获取订单类型, 活动商品单次只能购买一个
|
//获取订单类型, 活动商品单次只能购买一个
|
||||||
if ($cart['product']['delivery_way']) {
|
if ($cart['product']['delivery_way']) {
|
||||||
$delivery_way = explode(',', $cart['product']['delivery_way']);
|
$delivery_way = explode(',', $cart['product']['delivery_way']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user