Merge branch 'feature/purchase_record' into dev
This commit is contained in:
commit
fd4f98f756
@ -2554,11 +2554,14 @@ class StoreOrderRepository extends BaseRepository
|
||||
* @throws DbException
|
||||
* @throws ModelNotFoundException
|
||||
*/
|
||||
public function purchaseOrder($merId, $page, $limit)
|
||||
public function purchaseOrder($merId, $keyword, $page, $limit)
|
||||
{
|
||||
$orders = StoreOrder::where('mer_id', $merId)
|
||||
->where('pay_type', StoreGroupOrder::PAY_TYPE_CREDIT_BUY)
|
||||
->where('status', StoreOrder::STATUS_WAIT_COMMENT)
|
||||
->when($keyword !== '', function ($query) use ($keyword) {
|
||||
$query->where('order_sn|user_phone', 'like', "%$keyword%");
|
||||
})
|
||||
->page($page, $limit)
|
||||
->select();
|
||||
foreach ($orders as $order) {
|
||||
|
@ -383,7 +383,8 @@ class StoreOrder extends BaseController
|
||||
public function purchaseOrder($merId, StoreOrderRepository $orderRepository)
|
||||
{
|
||||
[$page, $limit] = $this->getPage();
|
||||
$list = $orderRepository->purchaseOrder($merId, $page, $limit);
|
||||
$keyword = $this->request->param('keyword');
|
||||
$list = $orderRepository->purchaseOrder($merId, $keyword, $page, $limit);
|
||||
return app('json')->success($list);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user