public function act_getJobLists($condition = array(), $sort = '', $limit = '') { $jobmodel = new JobModel(); $filed = ' jobpower_id,job_id,job_name,job_level,job_dept_id,job_pid,job_path,job_company_id,job_path,dept_name,company_name '; $where = !empty($condition) && is_array($condition) ? 'WHERE ' . implode(' AND ', $condition) : ''; //获取条数 if ($this->is_count === true) { $this->is_count = false; $jobcount = $jobmodel->count()->getJobLists($filed, $where); return $this->_checkReturnData($jobcount, 0); } $sort = empty($sort) ? '' : " ORDER BY {$sort} "; $joblists = $jobmodel->getJobLists($filed, $where, $sort, $limit); return $this->_checkReturnData($joblists, array()); }