update 商户列表
This commit is contained in:
parent
f05f303dc2
commit
3aaf5eb5ab
@ -559,7 +559,7 @@ class Order extends BaseController
|
|||||||
'user' => function ($query) {
|
'user' => function ($query) {
|
||||||
$query->field('uid,nickname,avatar');
|
$query->field('uid,nickname,avatar');
|
||||||
},
|
},
|
||||||
])->join('product_order_log og', 'order.order_id = og.order_id')
|
])->join('product_order_log og', 'StoreOrder.order_id = og.order_id')
|
||||||
->where(function($query) {
|
->where(function($query) {
|
||||||
if ($this->streetCode != '') {
|
if ($this->streetCode != '') {
|
||||||
$query->where('og.street_code', $this->streetCode);
|
$query->where('og.street_code', $this->streetCode);
|
||||||
@ -567,7 +567,14 @@ class Order extends BaseController
|
|||||||
$query->where('og.district_code', $this->areaCode);
|
$query->where('og.district_code', $this->areaCode);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$count = $query->count();
|
$count = $query->join('product_order_log og', 'StoreOrder.order_id = og.order_id')
|
||||||
|
->where(function($query) {
|
||||||
|
if ($this->streetCode != '') {
|
||||||
|
$query->where('og.street_code', $this->streetCode);
|
||||||
|
} else {
|
||||||
|
$query->where('og.district_code', $this->areaCode);
|
||||||
|
}
|
||||||
|
})->count();
|
||||||
$list = $query->page($page, $limit)->select();
|
$list = $query->page($page, $limit)->select();
|
||||||
return app('json')->success(compact('count', 'list'));
|
return app('json')->success(compact('count', 'list'));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user