1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- /**
- * Created by 上海互教教育科技有限公司.
- * User: 刘红伟
- * Date: 2016/7/19
- * Email: 454303753@qq.com
- * File:CMSOrder.php
- */
- class CMSPayment extends CActiveRecord{
- public function getDbConnection() {
- return Yii::app()->db251;
- }
- public static function model($className = __CLASS__){
- return parent::model($className);
- }
- public function tableName(){
- return "payment";
- }
- public function primaryKey(){
- return array('id');
- }
- public function getOrderPay($order_ids=array(),$status=1){
- $criteria = new CDbCriteria();
- if($status>=0){
- $criteria->addCondition('status='.$status);
- }
- if($order_ids)
- {
- $criteria->addInCondition('order_id',$order_ids);
- }
- return $this->findAll($criteria);
- }
- }
|