save($data); return !empty($result); } //获取单条数据 public function getRate($filter) { $result = $this->where($filter)->find(); if(!empty($result)) $result = $result->toArray(); return $result; } //更新 public function updateRate($filter ,$data) { $data['update_time'] = time(); $result = $this->where($filter)->update($data); return !empty($result); } //删除 public function deleRate($filter) { $result = $this->where($filter)->delete(); return !empty($result); } }