From d479d9fbcb37f8b861031c94a83d0e37761210c5 Mon Sep 17 00:00:00 2001 From: colly_wyx <wangyixiong_007@163.com> Date: Tue, 29 May 2018 09:07:03 +0800 Subject: [PATCH] 修改bug --- application/core/System/Db/Mongo.php | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/application/core/System/Db/Mongo.php b/application/core/System/Db/Mongo.php index af44e2e..b739a8c 100644 --- a/application/core/System/Db/Mongo.php +++ b/application/core/System/Db/Mongo.php @@ -330,6 +330,7 @@ $query = $this->_parseId($query); // ��������������� $cursor = $col->find($query,$fields); + // ������ if($sort){ $cursor->sort($sort); @@ -507,6 +508,21 @@ } /** + * ������ + * @param [type] $colName [description] + * @param [type] $params [description] + * @return [type] [description] + */ + public function aggregate($colName, $params){ + $col = $this->_getCol($colName); + // ������������ '_id' ������ + //$query = $this->_parseId($query); + $result = $col->aggregate($params); + + return $result['result']; + } + + /** * ��������������������������� * * @return array @@ -538,5 +554,6 @@ } return $arr; } + }//End Class ?> \ No newline at end of file -- Gitblit v1.8.0