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