diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index 8aa844fc..af64c548 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -977,6 +977,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository $total_extension_two = 0; //计算佣金和赠送的优惠券 foreach ($merchantCart['list'] as &$cart) { + $cartIds[] = $cart['cart_id']; $giveCouponIds = array_merge($giveCouponIds, $cart['product']['give_coupon_ids'] ?: []); $cart['cost'] = $cart['productAttr']['cost']; @@ -1044,6 +1045,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository $cart['extension_two'] = $extension_two; $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); + } unset($cart); diff --git a/app/controller/api/enter/EnterCompany.php b/app/controller/api/enter/EnterCompany.php index 560b85aa..dd3ad9d2 100644 --- a/app/controller/api/enter/EnterCompany.php +++ b/app/controller/api/enter/EnterCompany.php @@ -86,9 +86,13 @@ class EnterCompany extends BaseController ->where('is_fail', '=', 0) ->where('is_del', '=', 0) ->column('cart_id'); + $cart_id_str = implode('|',$cart_id); + $list = app()->make(StoreOrderRepository::class)->getList2($where,$page,$limit,$cart_id_str); + $data = app()->make(StoreOrderRepository::class)->userOrderNumber2($uid,$cart_id_str); + $list['all'] = $data['all']; $list['orderPrice'] = $data['orderPrice']; return app('json')->success($list); diff --git a/app/controller/api/store/order/StoreOrder.php b/app/controller/api/store/order/StoreOrder.php index cac9456e..da80a8d3 100644 --- a/app/controller/api/store/order/StoreOrder.php +++ b/app/controller/api/store/order/StoreOrder.php @@ -88,7 +88,8 @@ class StoreOrder extends BaseController $payType = $this->request->param('pay_type'); $post = (array)$this->request->param('post'); $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'; if ($isPc) { $payType = 'balance';