db()->where($where)->find(); if ($data) { $data['key'] = $data['product_key']; // $data['service'] = ProductBaseService::instance()->getService($data['product_key']); // if ($data['service']) { // $data['key'] = $data['service']['key']; // // } else { // return false; // } } return $data; } public function db($table = false) { $table = $table ? $table : $this->table; $this->db = $this->app->db->name($table); return $this->db; } }