/** * 二手房小区合并 * * @param array $houseLog */ private function ajkCommunityMerge($houseLog) { if ($houseLog['type'] != Const_ProLogType::LOG_COMMUNITY_MERGE || $houseLog['siteType'] != 1) { $this->setLog(sprintf('房源日志类型[%d]错误/不是二手房[%d]房源日志', $houseLog['type'], $houseLog['siteType'])); return; } $choicePlanInfo = Model_Plan_AjkPropspread::getAjkPropspreadByProId($houseLog['houseId']); if (empty($choicePlanInfo)) { $this->setLog(sprintf('没有获取到房源[%d]精选计划', $houseLog['houseId'])); return; } if ($choicePlanInfo['status'] != Model_Plan_EsfAjkPropSpread::ONLINE && $choicePlanInfo['status'] != Model_Plan_EsfAjkPropSpread::ONQUEUE) { $this->setLog(sprintf('房源[%d]精选计划[%d]状态[%d]不在推广、排队中', $houseLog['houseId'], $choicePlanInfo['id'], $choicePlanInfo['status'])); return; } Model_Choice_ActionQueue::addBidQueen(array('siteType' => $houseLog['siteType'], 'brokerId' => $houseLog['brokerId'], 'planId' => $choicePlanInfo['id'], 'proId' => $houseLog['houseId'], 'actionId' => Const_ChoiceType::CHOICE_HOUSE_AREA_CHANGE, 'createTime' => time(), 'createRemark' => sprintf('房源日志id:%d;type:%d', $houseLog['id'], $houseLog['type']), 'status' => 0, 'operationId' => $houseLog['operatorId'], 'ip' => 'Choice_CheckProLogToBidQueen')); $this->setLog(sprintf('房源[%d - %d]价格段变更,通知精选队列', $houseLog['houseId'], $choicePlanInfo['id'])); }
/** * 二手房精选该上没上,改下没下 * * @param array $queue * @return bool */ public function notifySolrUpDown($queue) { $choicePlan = Model_Plan_AjkPropspread::getAjkPropspreadByProId(intval($queue['proId'])); /** 如果房源当前为推广中,则通知solr上架房源 */ if (!empty($choicePlan) && $choicePlan['status'] == 1) { $queue['planId'] = $choicePlan['id']; $this->setMsg(sprintf('房源[%d]的精选计划[%d]的状态[%d]为推广中,通知solr上架', $queue['proId'], $choicePlan['id'], $choicePlan['status'])); $queue['cityId'] = $choicePlan['cityId']; $param = array('city_id' => $choicePlan['cityId'], 'broker_id' => $choicePlan['brokerId'], 'pro_id' => $choicePlan['propId'], 'flag' => Bll_Combo_NoticeSolrUpDown::SOLR_ACTION_UP, 'hpratio' => $choicePlan['offer'], 'comms_hpratio_a' => $choicePlan['commsHpratioA'], 'comms_hpratio' => $choicePlan['commsHpratio'], 'hpstarttime' => $choicePlan['spreadstartdate'], 'hpendtime' => $choicePlan['spreadenddate'], 'hpplanid' => $choicePlan['id'], 'update_time' => time(), 'from_type' => Bll_Combo_NoticeSolrUpDown::HLS_FROM_CHOICE_NOTIFY_SOLR_UP_DOWN); $this->writePropLog($queue, Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_UP, '精选该上没上,该下没下'); return $this->choiceUpDownSendSolr($param); } if (!empty($choicePlan)) { $queue['planId'] = $choicePlan['id']; $this->setMsg(sprintf('房源[%d]的精选计划[%d]的状态[%d]为非推广中,通知solr下架', $queue['proId'], $choicePlan['id'], $choicePlan['status'])); $queue['cityId'] = $choicePlan['cityId']; $param = array('city_id' => $choicePlan['cityId'], 'broker_id' => $choicePlan['brokerId'], 'pro_id' => $choicePlan['propId'], 'flag' => Bll_Combo_NoticeSolrUpDown::SOLR_ACTION_DOWN, 'hpratio' => $choicePlan['offer'], 'comms_hpratio_a' => $choicePlan['commsHpratioA'], 'comms_hpratio' => $choicePlan['commsHpratio'], 'hpstarttime' => $choicePlan['spreadstartdate'], 'hpendtime' => $choicePlan['spreadenddate'], 'hpplanid' => $choicePlan['id'], 'update_time' => time(), 'from_type' => Bll_Combo_NoticeSolrUpDown::HLS_FROM_CHOICE_NOTIFY_SOLR_UP_DOWN); $this->writePropLog($queue, Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_DOWN, '精选该上没上,该下没下'); return $this->choiceUpDownSendSolr($param); } $this->setMsg(sprintf('没有获取到精选计划')); $cityId = Model_Broker_AjkBrokerExtend::getCityIdByBrokerId($queue['brokerId']); $queue['cityId'] = $cityId; $param = array('city_id' => $cityId, 'broker_id' => $queue['brokerId'], 'pro_id' => $queue['proId'], 'flag' => Bll_Combo_NoticeSolrUpDown::SOLR_ACTION_DOWN, 'hpratio' => $choicePlan['offer'], 'comms_hpratio_a' => 0, 'comms_hpratio' => 0, 'hpstarttime' => 0, 'hpendtime' => 0, 'hpplanid' => 0, 'update_time' => time(), 'from_type' => Bll_Combo_NoticeSolrUpDown::HLS_FROM_CHOICE_NOTIFY_SOLR_UP_DOWN); $this->writePropLog($queue, Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_DOWN, '精选该上没上,该下没下'); return $this->choiceUpDownSendSolr($param); }