update 数据之眼-订单列表
This commit is contained in:
parent
71c727e262
commit
13e302f755
@ -528,7 +528,19 @@ class Order extends BaseController
|
||||
$where = $this->request->params(['type', 'date', 'mer_id','keywords','status','username','order_sn','is_trader','activity_type','group_order_sn','store_name']);
|
||||
$status = $where['status'];
|
||||
unset($where['status']);
|
||||
$query = $dao->search($where, null)->where($repository->getOrderType($status));
|
||||
$query = $dao->search($where, null)->where($repository->getOrderType($status))
|
||||
->with([
|
||||
'orderProduct',
|
||||
'merchant' => function ($query) {
|
||||
return $query->field('mer_id,mer_name,is_trader');
|
||||
},
|
||||
'groupOrder' => function ($query) {
|
||||
$query->field('group_order_id,group_order_sn');
|
||||
},
|
||||
'user' => function ($query) {
|
||||
$query->field('uid,nickname,avatar');
|
||||
},
|
||||
]);
|
||||
$count = $query->count();
|
||||
$list = $query->page($page, $limit)->select();
|
||||
return app('json')->success(compact('count', 'list'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user