12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- /**
- * 消息通知模型类
- * @author jiangfei
- * @date 2015-10-16 10:30:00
- * @company 上海风车教育有限公司.
- */
- class NotifyModel extends MyActiveRecord{
-
- public static function model($className = __CLASS__){
- return parent::model($className);
- }
- public function tableName(){
- return 'notification';
- }
-
- // 年级列表
- public function getNotifyList($semeseter_id=''){
-
- //$data = array();
- $criteria = new CDbCriteria();
- $semeseter_id && $criteria->addCondition('semester_id="'.$semeseter_id.'"');
-
- //$total = $this->count($criteria);
- //$pager = new CPagination($total);
- $criteria->order = 'id desc';
- $criteria->limit = 20;
- return $this->findAll($criteria);
- /* $pager->pageSize = 20;
- $pager->applyLimit($criteria);
- $data['result']=$this->findAll($criteria);
- $data['page']=$pager;
- $data['page_total']= $total;
- return $data; */
- }
- }
|