/** * 房源更新到solr * @param int $intRequestKey 请求类型 1-房源编号 2-推广编号 3-经纪人编号 * @param int $intRequestVal 请求类型对应的值 * @param int $intStatus 操作状态:1-更新(房源),2-预约 (房源),3-删除 (房源),4-手动推广开始(推广计划), * 5-手动推广结束(推广计划),6-日预算花完(定价推广),7-余额花完停止(定价推广), * 8-预算花完停止 (竞价推广),9-推广周期结束停止(竞价推广),10-经纪人房源下线 * @return int */ public static function updateHouseToSolr($intRequestKey, $intRequestVal, $intStatus) { if ($intRequestKey == 1) { $jpBidInfo = Model_Plan_Jp::getBidPlanByHouseIdV2($intRequestVal); //非套餐城市通知老队列 $ComboConfig = DAO_My_ComboConfig::getComboConfigByCityId($jpBidInfo->cityId); if ($ComboConfig && $ComboConfig['type'] == 0) { return true; } $objDa = new Model_House_UpDown_SolrJinpu(); $objDa->houseId = $intRequestVal; $objDa->status = 1; $objDa->createTime = date('Y-m-d H:i:s'); return $objDa->save(); } else { if ($intRequestKey == 2) { $objDa = new Model_Plan_JpSpreadStatusUpdate(); $objDa->spread_id = $intRequestVal; $objDa->status = $intStatus - 3; $objDa->create_time = date('Y-m-d H:i:s'); return $objDa->save(); } else { if ($intRequestKey == 3) { $objDa = new Model_Plan_JpSpreadBrokerUpdate(); $objDa->member_id = $intRequestVal; $objDa->status = $intStatus == 10 ? 1 : 2; $objDa->create_time = date('Y-m-d H:i:s'); $objDa->save(); } } } }
/** * @param Model_House_UpDown_HouseLog $task */ private function _solrJinpu($task) { $solr = new Model_House_UpDown_SolrJinpu(); $solr->houseId = $task->houseId; $solr->status = Model_House_UpDown_SolrJinpu::STATUS_UPDATE; $solr->createTime = date('Y-m-d H:i:s'); $solr->save(); return $solr; }