This commit is contained in:
luofei 2024-03-22 16:28:06 +08:00
commit cdbf8cc0c9
2 changed files with 17 additions and 6 deletions

View File

@ -1091,6 +1091,14 @@ class StoreOrderCreateRepository extends StoreOrderRepository
}
$user_address = isset($address) ? ($address['province'] . $address['city'] . $address['district'] . $address['street'] . $address['detail']) : '';
//整理订单数据
$payPrice_order = $merchantCart['order']['pay_price'];
$couponPrice_order = bcadd($merchantCart['order']['coupon_price'], $merchantCart['order']['platform_coupon_price'], 2);
if($remarkMoney){
$payPrice_order = $remarkMoney;//输入得金额
$couponPrice_order = $merchantCart['order']['pay_price'] -$payPrice_order;
}
$_order = [
'cartInfo' => $merchantCart,
'activity_type' => $orderInfo['order_type'],
@ -1113,7 +1121,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
'total_postage' => $merchantCart['order']['postage_price'],
'pay_postage' => $merchantCart['order']['postage_price'],
'svip_discount' => $merchantCart['order']['svip_discount'],
'pay_price' => $merchantCart['order']['pay_price'],
'pay_price' =>$payPrice_order,
'integral' => $merchantCart['order']['total_integral'],
'integral_price' => $merchantCart['order']['total_integral_price'],
'give_integral' => $merchantCart['order']['total_give_integral'],
@ -1122,7 +1130,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
'order_extend' => count($order_extend) ? json_encode($order_extend, JSON_UNESCAPED_UNICODE) : '',
'coupon_id' => implode(',', $merchantCart['order']['useCouponIds']),
'mark' => $mark[$merchantCart['mer_id']] ?? '',
'coupon_price' => bcadd($merchantCart['order']['coupon_price'], $merchantCart['order']['platform_coupon_price'], 2),
'coupon_price' => $couponPrice_order,
'platform_coupon_price' => $merchantCart['order']['platform_coupon_price'],
'pay_type' => $pay_type,
'refund_switch' => $merchantCart['order']['order_refund_switch'],

View File

@ -331,14 +331,17 @@ class StoreOrder extends BaseController
//初始化
return app('json')->success($this->repository->beginMerchant($merId));
}
//购物车有检测机制
$where = [
"a.mer_id" => $merId,
"p.is_show" => 1,
"p.status" => 1,
"p.is_gift_bag" => 0
"p.is_show" => 1, // 上架
"p.is_used" => 1,// 显示
"p.product_type" => 0,// 普通商品
"p.status" => 1, // 审核通过
"p.is_gift_bag" => 0 //不是礼包
];
return app('json')->success($this->repository->dealGoodsList($where,$money,$merId));
}