public function update(array $values) { if ($this->needFlushCache()) { // 清空表级缓存 $meta = $this->getMeta(); $meta->flush($this->db(), $this->model->table()); $this->flushAffectingRowCache(); } return parent::update($values); }