where($wheres); } return $query->page($page,$pageSize)->select(); } public function queryAllCount($wheres, $page, $pageSize){ $query = Db::view('templates', 'id, title, is_public, create_user, exam_class_id, impression, description, createdAt, parent_id'); if (!empty($wheres)){ $query->where($wheres); } return $query->count(); } }