Example #1
0
 /**
  * 根据公司ID获取有效的合同小区及时间段
  * @param $company_id
  */
 public function get_company_communitys($company_id)
 {
     apf_require_class("Solr_Solr");
     $crm_server = APF::get_instance()->get_config("crm_adv_server");
     $solr_url = $crm_server . "rest/advertisements/getCompanyCommissions/{$company_id}?json";
     $result = Solr_Solr::get_solr_data2($solr_url);
     $result = @$result['result'] ? $result['result'] : array();
     //        $result = array(0=>array('id' => 233, 'name'=>'张江汤臣豪园', 'start' => '2010-1-1', 'end'=>'2010-2-1'),1=>array('id' => 470, 'name'=>'华府天地', 'start' => '2010-3-1', 'end'=>'2010-4-1'),2=>array('id' => 488, 'name'=>'天天花园', 'start' => '2010-5-1', 'end'=>'2010-6-1'));
     return $result;
 }
Example #2
0
 public function get_community_list_by_ids($ids)
 {
     if (empty($ids)) {
         return array();
     }
     $this->set_community_ids($ids);
     $this->limit = count($ids);
     $solr = new Solr_Solr();
     if ($this->_fl) {
         $solr->set_query_fl($this->_fl);
     }
     $solr->set_query_q($this->ids);
     $solr->set_query_wt("json");
     $solr->set_query_start($this->get_start_rows());
     $solr->set_query_rows($this->limit);
     $url = $this->get_community_solr_server();
     $url .= "select?" . $solr->build_query_uri();
     $result = Solr_Solr::get_solr_data($url);
     return $result;
 }