Browse Source

Merge branch 'phoenix' of http://120.24.33.109:11081/hyzjshwo/lanzu_api_hyperf into phoenix

master
Lemon 6 years ago
parent
commit
6c322b381e
  1. 6
      app/Controller/v3/HomeController.php
  2. 9
      app/Controller/v3/OrderListController.php
  3. 4
      app/Service/v3/Implementations/OrderListService.php
  4. 30
      app/Service/v3/Implementations/UserCenterBlockService.php
  5. 4
      app/Service/v3/Interfaces/OrderListServiceInterface.php

6
app/Controller/v3/HomeController.php

@ -135,7 +135,8 @@ class HomeController extends BaseController
$roles[] = [
'key'=>'store',
'title'=>'商家',
'color'=>'#0091FF'
'color'=>'#0091FF',
'data'=>$store_info,
];
}
@ -143,7 +144,8 @@ class HomeController extends BaseController
$roles[] = [
'key'=>'sp',
'title'=>'服务',
'color'=>'#0091FF'
'color'=>'#0091FF',
'data'=>$sp_info,
];
}

9
app/Controller/v3/OrderListController.php

@ -47,8 +47,13 @@ class OrderListController extends BaseController
public function offlineForStore()
{
$params = $this->request->all();
$list = $this->orderListService->offlineByStore($params['store_id'], $params['tab'], $params['page'], $params['pagesize'],$params['start_time'],$params['end_time']);
$storeId = $this->request->input('store_id','');
$tab = $this->request->input('tab','all');
$page = $this->request->input('page',1);
$pagesize = $this->request->input('pagesize',10);
$startTime = $this->request->input('start_time','');
$endTime = $this->request->input('end_time','');
$list = $this->orderListService->offlineByStore($storeId, $tab, $page, $pagesize,$startTime,$endTime);
return $this->success($list);
}

4
app/Service/v3/Implementations/OrderListService.php

@ -95,7 +95,7 @@ class OrderListService implements OrderListServiceInterface
break;
}
$paginate = $builder->orderBy('created_at', 'desc')->paginate($pagesize);
$paginate = $builder->orderBy('lanzu_order_main.created_at', 'desc')->paginate($pagesize);
$orders = $paginate->toArray();
$stateTxet = [
@ -154,7 +154,7 @@ class OrderListService implements OrderListServiceInterface
$builder->whereBetween('lanzu_order_main.created_at',[strtotime($start_time.' 23:59:59'),strtotime($end_time.' 23:59:59')]);
}
$paginate = $builder->orderBy('created_at', 'desc')->paginate($pagesize);
$paginate = $builder->orderBy('lanzu_order_main.created_at', 'desc')->paginate($pagesize);
$orders = $paginate->toArray();
return ['has_more_pages' => $paginate->hasMorePages(), 'orders' => $orders['data']];
}

30
app/Service/v3/Implementations/UserCenterBlockService.php

@ -35,7 +35,7 @@ class UserCenterBlockService implements UserCenterBlockServiceInterface
'title' => '常用功能',
'items' => [
['name' => '收货地址', 'icon' => $img_host . 'user_icons/user_addr.png', 'type' => 'page', 'path' => '/pages/address/userAddress/userAddress','command'=>'user_addr'],
['name' => '当面付订单查询', 'icon' => $img_host . 'user_icons/offline_orders.png', 'type' => 'page', 'path' => '/pages/faceOrderList/faceOrderList','command'=>'offline_orders'],
['name' => '当面付订单查询', 'icon' => $img_host . 'user_icons/offline_orders.png', 'type' => 'page', 'path' => '/pages/facepay/facepay','command'=>'offline_orders'],
['name' => '在线客服', 'icon' => $img_host . 'user_icons/online_kf.png', 'type' => 'page', 'path' => '','command'=>'online_kf'],
['name' => '联系服务站', 'icon' => $img_host . 'user_icons/contact_fwz.png', 'type' => 'page', 'path' => '/pages/contactMarket/contactMarket','command'=>'contact_fwz'],
['name' => '关于懒族', 'icon' => $img_host . 'user_icons/about_lz.png', 'type' => 'page', 'path' => '/pages/aboutUs/aboutUs','command'=>'about'],
@ -43,25 +43,33 @@ class UserCenterBlockService implements UserCenterBlockServiceInterface
]
];
$blocks[] = [
'type' => 'store_user',
'title' => '商户相关',
'items' => [
['name' => '商家入口', 'icon' => $img_host . 'user_icons/shop_enter.png', 'type' => 'page', 'path' => '/pages/shopLogin/shopLogin','command'=>'store_login']
]
];
foreach ($roles as $key => $item) {
# code...
if($item['key'] == 'store'){
$blocks[] = [
'type' => 'store_user',
'title' => '商户相关',
'items' => [
['name' => '商家入口', 'icon' => $img_host . 'user_icons/shop_enter.png', 'type' => 'page', 'path' => '/pages/shopLogin/shopLogin','command'=>'store_login']
]
];
}
// if($item['key'] == 'store'){
// $blocks[] = [
// 'type' => 'store_user',
// 'title' => '商户相关',
// 'items' => [
// ['name' => '商家入口', 'icon' => $img_host . 'user_icons/shop_enter.png', 'type' => 'page', 'path' => '/pages/shopLogin/shopLogin','command'=>'store_login']
// ]
// ];
// }
if($item['key'] == 'sp'){
$blocks[] = [
'type' => 'sp_user',
'title' => '服务专员',
'items' => [
['name' => '评价', 'icon' => $img_host . 'user_icons/shop_enter.png', 'type' => 'page', 'path' => '/zh_cjdianc/pages/appraise/index','command'=>'store_login']
['name' => '评价', 'icon' => $img_host . 'user_icons/shop_enter.png', 'type' => 'page', 'path' => '/zh_cjdianc/pages/appraise/index?service_personnel_id='.$item['data']['id'],'command'=>'sp_login']
]
];
}

4
app/Service/v3/Interfaces/OrderListServiceInterface.php

@ -8,7 +8,7 @@ interface OrderListServiceInterface
public function check();
public function undo();
public function onlineByUser($userId, $tab, $page=1, $pagesize=10);
public function onlineByStore($userId, $tab, $page, $pagesize);
public function offlineByStore($userId, $tab, $page, $pagesize,$start_time = '',$end_time = '');
public function onlineByStore($storeId, $tab, $page, $pagesize);
public function offlineByStore($storeId, $tab, $page, $pagesize,$startTime = '',$endTime = '');
public function offlineByUser($userId, $page=1, $pagesize=10);
}
Loading…
Cancel
Save