CMSOrder_back.php 794 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Created by 上海互教教育科技有限公司.
  4. * User: 李凯磊
  5. * Date: 2017/3/23
  6. * Email: 503953171@qq.com
  7. * File:CMSOrder_back.php
  8. */
  9. class CMSOrder_back extends CActiveRecord{
  10. public function getDbConnection() {
  11. return Yii::app()->db251;
  12. }
  13. public static function model($className = __CLASS__){
  14. return parent::model($className);
  15. }
  16. public function tableName(){
  17. return "order_back";
  18. }
  19. public function primaryKey(){
  20. return array('order_id');
  21. }
  22. public function getOrderInfo($orderid){
  23. $criteria = new CDbCriteria();
  24. $criteria->select = '*';
  25. $criteria->addCondition('order_id=:id');
  26. $criteria->params[':id'] = $orderid;
  27. return $this->find($criteria);
  28. }
  29. }