Ejemplo n.º 1
0
 /**
  * 通知SOLR下架房源
  *
  * @param $cityId
  * @param $hzBrokerId
  * @param $houseId
  * @param int $ajkBrokerId
  */
 private function noticeComboSolr($cityId, $hzBrokerId, $houseId, $ajkBrokerId = 0)
 {
     if ($ajkBrokerId == 0) {
         $ajkBrokerId = Model_Broker_HzMapping::get_ajk_broker_id($hzBrokerId);
     }
     $result = Bll_Combo_NoticeSolrUpDown::noticeChoiceSolrZfAPI($cityId, $ajkBrokerId, $houseId, 2, Bll_Combo_NoticeSolrUpDown::SOLR_ACTION_DOWN, Bll_Combo_NoticeSolrUpDown::HLS_FROM_HOUSE_STATE_REPAIR);
     $this->setLog(sprintf('通知房源[%d]solr下架,result: %s', $houseId, json_encode($result)));
 }
Ejemplo n.º 2
0
 /**
  * 好租精选
  * @param $record
  * @return bool|mixed
  */
 private function noticeChoiceSolrZfAPI($record)
 {
     //14-精选推广,15-取消精选推广,16-取消精选排队
     if ($record['type'] == 14 || $record['type'] == Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_UP) {
         $flag = 1;
     } elseif ($record['type'] == 15 || $record['type'] == 16 || $record['type'] == Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_DOWN) {
         $flag = 2;
     } else {
         $this->setLog('不需要做solr处理' . __METHOD__);
         return false;
     }
     /*$houseIdx = Bll_House_HzHouse::getPropInfo($record['houseId'], $record['cityId']);
       if (!$houseIdx['status']) {
           $this->setLog('好租房源信息为空,无法处理 ');
           return false;
       }*/
     $res = Bll_Combo_NoticeSolrUpDown::noticeChoiceSolrZfAPI($record['cityId'], $record['brokerId'], $record['houseId'], 2, $flag, Bll_Combo_NoticeSolrUpDown::HLSFromChoiceUpDown, strtotime($record['addDate']), date('Ymd', strtotime($record['addDate'])) . $record['id']);
     $this->setLog('通知solr res: ' . json_encode($res));
     return $res;
 }