コード例 #1
0
 public function getRecommand($where)
 {
     $where['post_subscribe.info_type'] = 1;
     $total = $this->getRecommandCount($where);
     $num = 5;
     if ($total > $num) {
         $return['page'] = true;
     }
     $page_total = ceil($total / $num);
     $page = mt_rand(1, $page_total);
     $return['data'] = M('post_subscribe')->join('left join `student` on student.pkid=post_subscribe.student_id')->join('left join `resume` on resume.student_id=post_subscribe.student_id')->field('student.name,student.pkid as student_id,post_subscribe.pkid,student.graduate_school,student.detail_major,student.education,student.avatar,resume.pkid as resume_id')->page($page, $num)->group('post_subscribe.student_id')->where($where)->select();
     if (is_array($return['data'])) {
         foreach ($return['data'] as $k => $v) {
             $return['data'][$k]['education'] = $v['education'] ? getDegreeText($v['education']) : '';
         }
         return $return;
     } else {
         return '';
     }
 }
コード例 #2
0
 public function infoList()
 {
     //专业
     $list = array('scaleList' => parent::getScaleList(), 'categoryList' => parent::getCategoryList(), 'majorList' => self::majorTypeList(), 'eduList' => getDegreeText(null), 'rangeList' => getDaySalaryText(null), 'weekList' => getWorkDayText(null));
     return $list;
 }
コード例 #3
0
 public function infoList()
 {
     $list = array('industryList' => parent::getIndustryList(), 'scaleList' => parent::getScaleList(), 'categoryList' => parent::getCategoryList(), 'welfareList' => parent::getWelfareList(), 'provinceList' => self::getProvinceList(), 'eduList' => getDegreeText(null), 'rangeList' => getDaySalaryText(null));
     return $list;
 }