/** * Retrieves a list of models based on the current search/filter conditions. * * Typical usecase: * - Initialize the model fields with values from filter form. * - Execute this method to get CActiveDataProvider instance which will filter * models according to data in model fields. * - Pass data provider to CGridView, CListView or any similar widget. * * @return CActiveDataProvider the data provider that can return the models * based on the search/filter conditions. */ public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria = new CDbCriteria(); $criteria->compare('id', $this->id, true); $criteria->compare('user_id', $this->user_id, true); $criteria->compare('channel', $this->channel, true); $criteria->compare('type', $this->type); $criteria->compare('type_id', $this->type_id); $criteria->compare('sub_type_id', $this->sub_type_id, true); $criteria->compare('order_no', $this->order_no, true); $criteria->compare('order_name', $this->order_name, true); $criteria->compare('amount', $this->amount, true); $criteria->compare('device_type', $this->device_type); $criteria->compare('pay_channel', $this->pay_channel, true); $criteria->compare('pay_account', $this->pay_account, true); $criteria->compare('trade_no', $this->trade_no, true); $criteria->compare('status', $this->status); $criteria->compare('create_time', $this->create_time, true); $criteria->compare('update_time', $this->update_time, true); self::$_criteria = $criteria; return new CActiveDataProvider($this, array('criteria' => $criteria, 'sort' => array('defaultOrder' => 'id DESC'), 'pagination' => array('pageSize' => 100))); }