作者 潘浩文
1 个管道 的构建 通过 耗费 1 秒

XIAOPAN

@@ -35,9 +35,16 @@ class AdminOrderController extends AdminBaseController{ @@ -35,9 +35,16 @@ class AdminOrderController extends AdminBaseController{
35 if (!empty($param['order_no'])){ 35 if (!empty($param['order_no'])){
36 $where['order_no']=['like','%'.$param['order_no'].'%']; 36 $where['order_no']=['like','%'.$param['order_no'].'%'];
37 } 37 }
  38 + if (!empty($param['mobile'])){
  39 + $where['u.mobile']=['like','%'.$param['mobile'].'%'];
  40 + }
  41 + if (!empty($param['users_id'])){
  42 + $where['u.id']=$param['users_id'];
  43 + }
38 $where['state']=['in',[2,3]]; 44 $where['state']=['in',[2,3]];
39 $Order=new OrderModel(); 45 $Order=new OrderModel();
40 $data=$Order->alias('a') 46 $data=$Order->alias('a')
  47 + ->join('users u','a.users_id=u.id')
41 // ->field('a.*,b.serial_number,b.hospital') 48 // ->field('a.*,b.serial_number,b.hospital')
42 // ->join('equipment b','a.eq_name=b.name') 49 // ->join('equipment b','a.eq_name=b.name')
43 ->where($where) 50 ->where($where)