/** * 查询全部数据 * * @param string $query * @param string $sort * @param string $fields * @return string */ public function findAll($query, $sort, $fields) { $query = $this->toArray($query); $sort = $this->toArray($sort); if (empty($sort)) { $sort = array('_id' => -1); } $fields = $this->toArray($fields); $rst = $this->_model->findAll($query, $sort, 0, 0, $fields); return $this->result($rst); }