field('a.*, u.nickname') ->order('a.id DESC') ->leftJoin('user u', 'u.uid = a.uid'); if ($where['uid']) $model->where('a.uid', $where['uid']); if ($where['null']) $model->where('a.status', '>', 5); if ($where['auction'])$model->where('a.id|a.name|u.nickname' , 'like', '%'.$where['auction'],'%'); $data['count'] = $model->count(); if ($where['page'] && $where['limit']){ $model->page($where['page'], $where['limit']); }else{ $model->page(20, 1); } $list = $model->select(); $list = count($list) ? $list->toArray() : []; $data['data'] = $list; return $data; } }