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/Model/Base.php | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/application/core/System/Model/Base.php b/application/core/System/Model/Base.php index 5e35537..80a189b 100644 --- a/application/core/System/Model/Base.php +++ b/application/core/System/Model/Base.php @@ -56,12 +56,31 @@ * @param [type] $query [description] * @return [type] [description] */ - public function update($data, $query){ + public function update($data, $query = array()){ return $this->db->update($this->table, $data, $query); } + /** + * ������ + * @param [type] $params [description] + * @return [type] [description] + */ public function aggregate($params){ return $this->db->aggregate($this->table, $params); } + /** + * ������[������������������] + * @param array $query [description] + * @return [type] [description] + */ + public function delete($query = array()){ + if(!empty($query)) + return $this->db->delete($this->table, $query); + else + return false; + } + + + } -- Gitblit v1.8.0