Пример #1
0
 /**
  * 金铺精选
  * @param $record
  * @return bool|mixed
  */
 private function noticeChoiceSolrJpAPI($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;
     }
     //判断套餐城市
     $isComboCity = self::checkIsComboCity($record['cityId']);
     if (!$isComboCity) {
         $this->setLog('非套餐城市,精选不走中间件');
         return false;
     }
     $houseIdx = Model_House_JpHouseIdx::data_access()->filter('id', $record['houseId'])->find_only();
     if (intval($houseIdx->houseType) <= 0) {
         $this->setLog('金铺房源房源类型为空,无法处理 ');
         return false;
     }
     $res = Bll_Combo_NoticeSolrUpDown::noticeChoiceSolrJpAPI($record['cityId'], $record['brokerId'], $record['houseId'], $houseIdx->houseType, $flag, Bll_Combo_NoticeSolrUpDown::HLSFromChoiceUpDown, strtotime($record['addDate']), date('Ymd', strtotime($record['addDate'])) . $record['id']);
     $this->setLog('通知solr res: ' . json_encode($res));
     return $res;
 }