创建订单
This commit is contained in:
parent
98c464048f
commit
2f3e571112
@ -78,6 +78,7 @@ class OrderLogic extends BaseLogic
|
||||
$cart_select[$k]['cost'] = bcmul($v['cart_num'], $productBase['cost'], 2) ?? 0;
|
||||
$cart_select[$k]['total'] = bcmul($v['cart_num'], $find['price'], 2);//钱
|
||||
$cart_select[$k]['price'] = $find['price'];
|
||||
$cart_select[$k]['total_price'] = bcmul($v['cart_num'], $find['price'], 2);//钱
|
||||
$cart_select[$k]['product_id'] = $v['goods'];
|
||||
$cart_select[$k]['old_cart_id'] = $v['id'];
|
||||
$cart_select[$k]['cart_num'] = $v['cart_num'];
|
||||
@ -111,7 +112,7 @@ class OrderLogic extends BaseLogic
|
||||
$discountRate = bcdiv($discountRate, '10', 2);
|
||||
$pay_price = bcdiv(bcmul($pay_price, $discountRate, 4), '1', 2);
|
||||
} else {
|
||||
$userVip = User::where('id', \request()->userId)->value('user_ship');
|
||||
/* $userVip = User::where('id', \request()->userId)->value('user_ship');
|
||||
if ($userVip) {
|
||||
switch ($userVip) {
|
||||
case UserShipEnum::VIP1:
|
||||
@ -134,7 +135,7 @@ class OrderLogic extends BaseLogic
|
||||
}
|
||||
$discountRate = bcdiv($discountRate, '100', 2);
|
||||
$pay_price = bcdiv(bcmul($pay_price, $discountRate, 4), '1', 2);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
if (!empty(self::$total) && !empty($pay_price)) {
|
||||
bcscale(2);
|
||||
@ -152,7 +153,7 @@ class OrderLogic extends BaseLogic
|
||||
'vip_price' => $vipPrice,
|
||||
'total_num' => count($cart_select),//总数
|
||||
'pay_type' => $params['pay_type'] ?? 0,
|
||||
'reservation_time' => $params['reservation_time'] ?? '',
|
||||
'reservation_time' => $params['reservation_time'] ?? null,
|
||||
'cart_id' => implode(',', $cartId),
|
||||
'store_id' => $params['store_id'] ?? 0,
|
||||
'shipping_type' => $params['shipping_type'] ?? 1//配送方式 1=快递 ,2=门店自提
|
||||
@ -189,7 +190,7 @@ class OrderLogic extends BaseLogic
|
||||
$_order['pay_type'] = $orderInfo['order']['pay_type'];
|
||||
$_order['verify_code'] = $verify_code;
|
||||
$_order['reservation_time'] = null;
|
||||
if (isset($params['reservation_time'])) {
|
||||
if (isset($params['reservation_time']) && $params['reservation_time']) {
|
||||
$_order['reservation_time'] = $params['reservation_time'];
|
||||
$_order['reservation'] = YesNoEnum::YES;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user