完成订单接口更新
This commit is contained in:
parent
d4d07fa9ba
commit
b8a3516a20
@ -977,6 +977,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
$total_extension_two = 0;
|
$total_extension_two = 0;
|
||||||
//计算佣金和赠送的优惠券
|
//计算佣金和赠送的优惠券
|
||||||
foreach ($merchantCart['list'] as &$cart) {
|
foreach ($merchantCart['list'] as &$cart) {
|
||||||
|
|
||||||
$cartIds[] = $cart['cart_id'];
|
$cartIds[] = $cart['cart_id'];
|
||||||
$giveCouponIds = array_merge($giveCouponIds, $cart['product']['give_coupon_ids'] ?: []);
|
$giveCouponIds = array_merge($giveCouponIds, $cart['product']['give_coupon_ids'] ?: []);
|
||||||
$cart['cost'] = $cart['productAttr']['cost'];
|
$cart['cost'] = $cart['productAttr']['cost'];
|
||||||
@ -1044,6 +1045,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
$cart['extension_two'] = $extension_two;
|
$cart['extension_two'] = $extension_two;
|
||||||
$total_extension_one = bcadd($total_extension_one, bcmul($extension_one, $cart['cart_num'], 2), 2);
|
$total_extension_one = bcadd($total_extension_one, bcmul($extension_one, $cart['cart_num'], 2), 2);
|
||||||
$total_extension_two = bcadd($total_extension_two, bcmul($extension_two, $cart['cart_num'], 2), 2);
|
$total_extension_two = bcadd($total_extension_two, bcmul($extension_two, $cart['cart_num'], 2), 2);
|
||||||
|
|
||||||
}
|
}
|
||||||
unset($cart);
|
unset($cart);
|
||||||
|
|
||||||
|
@ -86,9 +86,13 @@ class EnterCompany extends BaseController
|
|||||||
->where('is_fail', '=', 0)
|
->where('is_fail', '=', 0)
|
||||||
->where('is_del', '=', 0)
|
->where('is_del', '=', 0)
|
||||||
->column('cart_id');
|
->column('cart_id');
|
||||||
|
|
||||||
$cart_id_str = implode('|',$cart_id);
|
$cart_id_str = implode('|',$cart_id);
|
||||||
|
|
||||||
$list = app()->make(StoreOrderRepository::class)->getList2($where,$page,$limit,$cart_id_str);
|
$list = app()->make(StoreOrderRepository::class)->getList2($where,$page,$limit,$cart_id_str);
|
||||||
|
|
||||||
$data = app()->make(StoreOrderRepository::class)->userOrderNumber2($uid,$cart_id_str);
|
$data = app()->make(StoreOrderRepository::class)->userOrderNumber2($uid,$cart_id_str);
|
||||||
|
|
||||||
$list['all'] = $data['all'];
|
$list['all'] = $data['all'];
|
||||||
$list['orderPrice'] = $data['orderPrice'];
|
$list['orderPrice'] = $data['orderPrice'];
|
||||||
return app('json')->success($list);
|
return app('json')->success($list);
|
||||||
|
@ -88,7 +88,8 @@ class StoreOrder extends BaseController
|
|||||||
$payType = $this->request->param('pay_type');
|
$payType = $this->request->param('pay_type');
|
||||||
$post = (array)$this->request->param('post');
|
$post = (array)$this->request->param('post');
|
||||||
$is_dg = $this->request->param('is_dg',0);
|
$is_dg = $this->request->param('is_dg',0);
|
||||||
$source = (int)$this->request->param('source'); // 1 小组服务 2 普通来源
|
$source = $this->request->param('source'); // 1 小组服务 2 普通来源
|
||||||
|
$source = !isset($source)?2:$source; // 默认来源为2 普通商品订单
|
||||||
$isPc = $payType === 'pc';
|
$isPc = $payType === 'pc';
|
||||||
if ($isPc) {
|
if ($isPc) {
|
||||||
$payType = 'balance';
|
$payType = 'balance';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user