StudentImproveScorePlanTopics.php 720 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * 学生提分册模型类
  4. * @author jiangfei
  5. * @date 2015-08-17 18:28:00
  6. * @company 上海风车教育有限公司.
  7. */
  8. class StudentImproveScorePlanTopics extends MyActiveRecord{
  9. public static function model($className = __CLASS__){
  10. return parent::model($className);
  11. }
  12. public function tableName(){
  13. return "student_improve_score_plan_topics";
  14. }
  15. public function getTopicsByPlanIds($planIds){
  16. $result = array();
  17. if ($planIds AND is_array($planIds)) {
  18. $criteria = new CDbCriteria();
  19. $criteria->addCondition("plan_id IN (". implode(',', $planIds) .")");
  20. $result = getAttributes($this->findAll($criteria));
  21. }
  22. return $result;
  23. }
  24. }