于宏哲PHP 10 months ago
parent
commit
939e707791
  1. 15
      niucloud/app/service/admin/order_table/OrderTableService.php

15
niucloud/app/service/admin/order_table/OrderTableService.php

@ -38,12 +38,23 @@ class OrderTableService extends BaseAdminService
* @param array $where
* @return array
*/
public function getPage(array $where = [])
public function getPage(array $data = [])
{
$where = [];
$field = 'id,resource_id,payment_id,order_status,payment_type,order_amount,course_id,class_id,staff_id,after_sales_status,after_sales_reason,after_sales_time,created_at,updated_at,payment_time,subscription_payment_time';
$order = 'id desc';
if($data['order_status']){
$where[] = ['order_status','=',$data['order_status']];
}
if($data['payment_type']){
$where[] = ['payment_type','=',$data['payment_type']];
}
$search_model = $this->model->withSearch(["order_status","payment_type","resource_id"], $where)->with(['customerResources','course','classGrade','personnel'])->field($field)->order($order);
if($data['resource_id']){
$where[] = ['resource_id','=',$data['resource_id']];
}
$search_model = $this->model->where($where)->with(['customerResources','course','classGrade','personnel'])->field($field)->order($order);
$list = $this->pageQuery($search_model);
return $list;
}

Loading…
Cancel
Save