更新购物车转售调货价格计算
This commit is contained in:
parent
fb04e2d60d
commit
c5ad186617
@ -118,7 +118,6 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
app()->make(StoreDiscountRepository::class)
|
||||
->check($merchantCartList[0]['list'][0]['source_id'], $merchantCartList[0]['list'], $user);
|
||||
}
|
||||
|
||||
$orderDeliveryStatus = true;
|
||||
$order_svip_discount = 0;
|
||||
// 循环计算每个店铺的订单数据
|
||||
|
@ -525,6 +525,14 @@ class StoreOrderRepository extends BaseRepository
|
||||
return $cart['productAssistAttr']['assist_price'];
|
||||
} else if ($cart['product_type'] == '4') {
|
||||
return $cart['activeSku']['active_price'];
|
||||
// 更新调货价格
|
||||
} else if ($cart['product_type'] == '98') {
|
||||
$price = Db::name('resale')->where('product_attr_unique', $cart['product_attr_unique'])->where('status', 0)->value('price');
|
||||
if ($price) {
|
||||
return $price;
|
||||
} else {
|
||||
return $cart['productAttr']['price'];
|
||||
}
|
||||
} else {
|
||||
return $cart['productAttr']['price'];
|
||||
}
|
||||
@ -540,6 +548,14 @@ class StoreOrderRepository extends BaseRepository
|
||||
return 0;
|
||||
} else if ($cart['product_type'] == '4') {
|
||||
return 0;
|
||||
// 更新调货价格
|
||||
} else if ($cart['product_type'] == '98') {
|
||||
$price = Db::name('resale')->where('product_attr_unique', $cart['product_attr_unique'])->where('status', 0)->value('price');
|
||||
if ($price) {
|
||||
return $price;
|
||||
} else {
|
||||
return $cart['productAttr']['price'];
|
||||
}
|
||||
} else {
|
||||
return $cart['productAttr']['price'];
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class StoreOrder extends BaseController
|
||||
$user = $this->request->userInfo();
|
||||
$uid = $user->uid;
|
||||
if (!($count = count($cartId)) || $count != count($cartRepository->validIntersection($cartId, $uid)))
|
||||
return app('json')->fail('数据无效');
|
||||
return app('json')->fail('数据无效1');
|
||||
$orderInfo = $orderCreateRepository->v2CartIdByOrderInfo($user, $cartId, $takes, $couponIds, $useIntegral, $addressId);
|
||||
|
||||
return app('json')->success($orderInfo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user