Browse Source

确认订单

master
Lemon 6 years ago
parent
commit
1e1901b92b
  1. 9
      app/Controller/v3/OrderOnlineController.php
  2. 2
      app/Controller/v3/ShopCartController.php
  3. 2
      app/Service/v3/Implementations/ShopCartService.php
  4. 2
      app/Service/v3/Interfaces/ShopCartServiceInterface.php

9
app/Controller/v3/OrderOnlineController.php

@ -70,7 +70,8 @@ class OrderOnlineController extends BaseController
* */
public function review()
{
$params = $this->request->all();
$userId = $this->request->input('user_id');
$marketId = $this->request->input('market_id');
//判断用户有没有绑定手机
// $telExists = $this->userBindTelService->check($params['user_id']);
// if(!$telExists){
@ -81,10 +82,10 @@ class OrderOnlineController extends BaseController
//返回预约送达时间 数组
$res['appointment_time'] = $this->appointmentTimeService->do();
//
$res['store_list'] = $this->shopCartService->do();
$res['store_list'] = $this->shopCartService->do($userId,$marketId);
//获取用户优惠券
$res['coupon']['available'] = $this->couponRecService->allForOrderOlAvailable('181.02',$params['user_id'],'',1,'','');
$res['coupon']['not_available'] = $this->couponRecService->allForOrderOlAvailable('181.02',$params['user_id'],'',1,'','');
$res['coupon']['available'] = $this->couponRecService->allForOrderOlAvailable('181.02',$userId,'',1,'');
$res['coupon']['not_available'] = $this->couponRecService->allForOrderOlAvailable('181.02',$userId,'',1,'');
//获取配送费
$res['distribution_price'] = '5.0';
//增值服务接口

2
app/Controller/v3/ShopCartController.php

@ -30,7 +30,7 @@ class ShopCartController extends BaseController
{
$userId = $this->request->input('user_id');
$marketId = $this->request->input('market_id');
$res['shopcart']['count'] = $this->shopCartService->countGoods();
$res['shopcart']['count'] = $this->shopCartService->countGoods($userId,$marketId);
$res['shopcart']['total'] = $this->shopCartService->getTotal($userId,$marketId);
return $this->success($res);
}

2
app/Service/v3/Implementations/ShopCartService.php

@ -128,7 +128,7 @@ class ShopCartService implements ShopCartServiceInterface
return $storeArr;
}
public function countGoods()
public function countGoods($userId,$marketId)
{
return mt_rand(1,100);
}

2
app/Service/v3/Interfaces/ShopCartServiceInterface.php

@ -10,7 +10,7 @@ interface ShopCartServiceInterface
public function undo($userId,$marketId);
public function countGoods();
public function countGoods($userId,$marketId);
public function getTotal($userId,$marketId);
}
Loading…
Cancel
Save