/** * 覆盖父类方法(non-PHPdoc) * @see MY_Model::getList() */ function getList($where = '', $limit = NULL, $offset = NULL, $colum = '', $orderby = '') { //更改数据库链接配置 $this->db = $this->load->database('ntsdf', true); $findList = parent::getList($where, $limit, $offset, $colum, $orderby); //查完之后将数据库链接设置回默认设置 $this->db = $this->load->database('', true); return $findList; }
/** * 获取专营店列表 * @param array $where * @return array */ function getNewList($where) { //更改数据库链接配置 $this->db = $this->load->database('dflpvmkt', true); //isset($where['SpState_sys']) || $where['SpState_sys'] = 1; //isset($where['isOpen']) || $where['isOpen'] = 1; $findList = parent::getList($where, NULL, NULL, $this->colum); //查完之后将数据库链接设置回默认设置 $this->db = $this->load->database('', true); $list = array(); foreach ($findList as $v) { $list[(int) $v['userId']] = $this->gbkToUtf8($v); } return $list; }