Ejemplo n.º 1
0
 public function handle_request_internal()
 {
     $brokerIds = explode(',', $this->_params['brokerIds']);
     $cityId = $this->_params['cityId'];
     $renovateTime = $this->_params['renovateTime'];
     //某时间以后创建的房源数量
     $isComboCity = Bll_City::isComboCity($cityId);
     $propIds = array();
     if ($isComboCity) {
         //如果是套餐城市 套餐房源表中 批量获取经纪人在线房源
         $comboSpreadHouseList = Bll_Broker_Combo_ManageAjk::getComboSpreadHouseList($brokerIds, $cityId);
         $propIds = array_keys($comboSpreadHouseList);
     } else {
         //如果是定价城市 获取经纪人定价计划--获取有效计划房源关系
         $fixSpreadPlanList = Bll_Plan_Fix_AjkPlan::getBrokerPlanList($brokerIds);
         //获取经纪人有效定价计划  计划表
         $fixSpreadPlanIds = array_keys($fixSpreadPlanList);
         //获取有效计划房源关系
         $relations = Bll_Plan_Fix_AjkPlan::getPropFixedPlanRelation($brokerIds, $cityId, $fixSpreadPlanIds);
         foreach ($relations as $relation) {
             $propIds[] = $relation['propId'];
         }
     }
     $propsInfos = Bll_House_EsfHouse::getHouseBaseInfoByGetAll($propIds, $cityId, array(), '', '', $renovateTime);
     $brokerNewPropNum = count($propsInfos);
     return array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => array('brokerNewPropNum' => $brokerNewPropNum));
 }
 private function getAjkFixPlanList()
 {
     return Bll_Plan_Fix_AjkPlan::scanPlanByCityId($this->_cityId, $this->_startId, self::PLAN_LIMIT);
 }
Ejemplo n.º 3
0
 /**
  * 获取经纪人的定价计划信息
  *
  * @param int $brokerId
  * @param int $cityId
  * @param array $propIds
  * @param int $brokerCheckState
  * @return array
  */
 public static function getBrokerFixPlanList($brokerId, $cityId, &$propIds, $brokerCheckState = 1)
 {
     $rtn = array();
     $fixSpreadPlanList = Bll_Plan_Fix_AjkPlan::getBrokerPlanList($brokerId);
     if (empty($fixSpreadPlanList)) {
         return $rtn;
     }
     if (!is_array($propIds)) {
         $propIds = array();
     }
     $balance = static::getAccountBalance($brokerId);
     $date = date('Ymd');
     foreach ($fixSpreadPlanList as $fixSpreadPlan) {
         $fixPlanId = $fixSpreadPlan['id'];
         // $dayCost = Bll_Ppc_ServiceAPI::planTodayNewCost($fixPlanId);
         // $fixSpreadPlan['dayCost'] = $dayCost['allAmount'] ? $dayCost['allAmount'] : 0;
         $dayCost = Bll_Ppc_ServiceAPI::brokerDailyFixCost($brokerId, $fixPlanId, $date, $date);
         $fixSpreadPlan['dayCost'] = max(0, $dayCost) / 100;
         // $fixSpreadPlan['clickTotal'] = $dayCost['allClick'];
         $planDailyClickNum = Bll_Ppc_ServiceAPI::getFixPlanDailyClickNum($brokerId, $fixPlanId, $date, $date);
         $fixSpreadPlan['clickTotal'] = 0;
         if (!empty($planDailyClickNum)) {
             foreach ($planDailyClickNum as $planDailyClick) {
                 $fixSpreadPlan['clickTotal'] += intval($planDailyClick['clickNum']);
             }
         }
         // $fixSpreadPlan['allAgioAmount'] = $dayCost['allAgioAmount'];
         $fixSpreadPlan['balance'] = $balance;
         if ($brokerCheckState != 1) {
             $fixSpreadPlan['flag'] = 6;
         } elseif ($balance <= 0) {
             $fixSpreadPlan['flag'] = 2;
         } elseif ($fixSpreadPlan['viewtime'] <= time()) {
             $fixSpreadPlan['flag'] = 1;
         } elseif ($fixSpreadPlan['viewtime'] == 1893427200) {
             //账户没钱停止的标记(2030年),显示以结束
             $fixSpreadPlan['flag'] = $balance > 0 ? 3 : 2;
         } elseif ($fixSpreadPlan['viewtime'] == 1861891200) {
             //手动停止标记(2029年)
             $fixSpreadPlan['flag'] = 3;
         } elseif ($fixSpreadPlan['ceiling'] <= $fixSpreadPlan['dayCost'] * 100) {
             //限额小于等于花费,限额不足
             $fixSpreadPlan['flag'] = 4;
         } else {
             $fixSpreadPlan['flag'] = 5;
         }
         $planInfo = array('planInfo' => $fixSpreadPlan, 'houseList' => array());
         $propFixedPlanRelationList = Bll_Plan_Fix_AjkPlan::getPropFixedPlanRelation($brokerId, $cityId, $fixPlanId);
         foreach ($propFixedPlanRelationList as $propFixedPlanRelation) {
             $propIds[] = $propFixedPlanRelation['propId'];
             $planInfo['houseList'][] = $propFixedPlanRelation['propId'];
         }
         $rtn[] = $planInfo;
     }
     return $rtn;
 }
Ejemplo n.º 4
0
 public function handle_request()
 {
     $brokerList = Model_Broker_AjkBrokerExtend::scanBroker($this->_startId, self::BATCH_LIMIT);
     if (empty($brokerList)) {
         file_put_contents($this->_doneFile, 'YES');
     }
     foreach ($brokerList as $broker) {
         $brokerId = $broker['brokerId'];
         $cityId = $broker['cityId'];
         $this->setCursor($brokerId);
         /** 套餐城市的不予以处理 */
         if (Bll_City::isComboCity($broker['cityId'])) {
             $this->logMsg(sprintf('经纪人[%d] 城市[%d] 是套餐城市,不予处理。', $brokerId, $cityId));
             continue;
         }
         /** 判断经纪人所在城市是否已经开启多档封顶 */
         if (false == Bll_Broker_Manage_AjkPropList::checkSelectLimitTempAvailable($cityId)) {
             $this->logMsg(sprintf('经纪人[%d] 城市[%d] 没有开启多档封顶,不予处理。', $brokerId, $cityId));
             continue;
         }
         /** 获取经纪人城市封顶限额 */
         $ppcLimitInfo = Bll_Ppc_ServiceAPI::getPpcBrokerLimitInfo($brokerId);
         if (empty($ppcLimitInfo)) {
             $this->logMsg(sprintf('经纪人[%d] 城市[%d] 获取封顶限额失败。', $brokerId, $cityId));
             file_put_contents($this->_errorBroker, $brokerId, FILE_APPEND);
             continue;
         }
         $ppcFixHouseCountLimit = $ppcLimitInfo['promotionLimit'];
         /** 获取经纪人所有的定价计划 */
         $fixPlanList = Bll_Plan_Fix_AjkPlan::getBrokerPlanList($broker);
         $fixSpreadHouseList = array();
         foreach ($fixPlanList as $fixPlan) {
             $planId = $fixPlan['id'];
             /** 获取经纪人指定定价计划下房源计划关系 */
             $fixSpreadHouseList = $fixSpreadHouseList + Bll_Plan_Fix_AjkPlan::getPropFixedPlanRelation($brokerId, $cityId, $planId);
         }
         $fixSpreadHouseCount = count($fixSpreadHouseList);
         if ($fixSpreadHouseCount <= $ppcFixHouseCountLimit) {
             $this->logMsg(sprintf('经纪人[%d] 城市[%d] 可以推广[%d]套房源,实际推广了[%d]套房源,没有多余房源。', $brokerId, $cityId, $ppcFixHouseCountLimit, $fixSpreadHouseCount));
             continue;
         }
         $this->logMsg(sprintf('经纪人[%d] 城市[%d] 可以推广[%d]套房源,实际推广了[%d]套房源,多余[%d]房源下架。', $brokerId, $cityId, $ppcFixHouseCountLimit, $fixSpreadHouseCount, $fixSpreadHouseCount - $ppcFixHouseCountLimit));
         /** 测试,不予以处理 */
         file_put_contents('/data1/logs/Repair_Bug46849.test', $brokerId, FILE_APPEND);
         continue;
         $updateTime2IdMapping = array();
         $updateTime = array();
         foreach ($fixSpreadHouseList as $fixSpreadHouse) {
             $intUpdateTime = strtotime($fixSpreadHouse['updatedDatetime']);
             $updateTime[] = $intUpdateTime;
             if (!isset($updateTime2IdMapping[$intUpdateTime])) {
                 $updateTime2IdMapping[$intUpdateTime] = array();
             }
             $updateTime2IdMapping[$intUpdateTime][] = $fixSpreadHouse;
         }
         $updateTime = array_unique($updateTime, SORT_NUMERIC);
         rsort($updateTime, SORT_NUMERIC);
         $relationList = array();
         foreach ($updateTime as $key) {
             $relationList = array_merge($relationList, $updateTime2IdMapping[$key]);
         }
         /** 需要下架的推广房源 */
         $houseList = array_slice($relationList, 0, $fixSpreadHouseCount - $ppcFixHouseCountLimit);
         foreach ($houseList as $house) {
             if (Bll_Ppc_ServiceAPI::deleteHouseFromFixPlan($brokerId, $house['planId'], $house['propId'], 46849)) {
                 $this->logMsg(sprintf('经纪人[%d] 城市[%d] 房源[%d]从计划[%d]下架成功。', $brokerId, $cityId, $house['propId'], $house['planId']));
                 continue;
             }
             $this->logMsg(sprintf('经纪人[%d] 城市[%d] 房源[%d]从计划[%d]下架失败。', $brokerId, $cityId, $house['propId'], $house['planId']));
         }
     }
     if (count($brokerList) < self::BATCH_LIMIT) {
         $this->logMsg(sprintf('startId: %d 处理结束。', $this->_startId));
         file_put_contents($this->_doneFile, 'YES');
         return;
     }
 }
Ejemplo n.º 5
0
 /**
  * @param House_PropviewController $controller
  * @param AJKRequest $request
  * @param AJKResponse $response
  *
  * @return array
  */
 public static function handlerPropViewRequest($controller, $request, $response)
 {
     $routeMatches = $request->get_router_matches();
     $houseId = $routeMatches[2];
     $cityId = $request->getBrokerCityId();
     $brokerId = $request->getBrokerId();
     $pageParams = array('houseId' => $houseId);
     $houseInfo = Bll_House_EsfHouse::getHouseBaseInfoEx($houseId, $cityId);
     /** 不是当前经纪人的房源则返回到房源管理页去 */
     if (empty($houseInfo) || $houseInfo['brokerId'] != $brokerId) {
         $response->redirect('/ajkbroker/user/manage/proplist/ajk/');
     }
     $pageParams['title'] = $houseInfo['proName'];
     $houseInfo['mobile'] = $houseInfo['uriCode'] == 'mobile.asyn' || $houseInfo['uriCode'] == 'mobile-ajk-broker.asyn' ? 1 : 0;
     $pageParams['info'] = sprintf('%s %d平米,%d室%d厅%d卫,%d/%d层,%.2f万 (房源ID:%d)', $houseInfo['commName'], $houseInfo['areaNum'], $houseInfo['roomNum'], $houseInfo['hallNum'], $houseInfo['toiletNum'], $houseInfo['proFloor'], $houseInfo['floorNum'], $houseInfo['proPrice'], $houseId);
     $currentDate = strtotime(date('Y-m-d 00:00:00'));
     $postDate = strtotime(date('Y-m-d 00:00:00', $houseInfo['postDate']));
     $pageParams['leftDay'] = max(0, 90 - floor(($currentDate - $postDate) / 86400));
     $pageParams['houseInfo'] = $houseInfo;
     $pageParams['viewLink'] = Util_Url::ajkHouseDetailUrl($houseId, $cityId);
     $pageParams['editURL'] = Bll_Ppc_LinkManager::getSaleEditUrl($houseId);
     $houseAdShow = Model_House_AdPropShowSale::getHouseAdSale($brokerId, $houseInfo['proId']);
     $pageParams['AdShow'] = empty($houseAdShow) ? false : true;
     $pageParams['isIllegal'] = $houseInfo['isVisible'] == 0 && $houseInfo['expireWorker'] != 'propertyReport';
     // TODO 获取小区在线房源和排名 需要重构
     $pageParams['communitySaleCount'] = Model_Community_AjkSaleRentCount::getCommunitySaleNum($houseInfo['commId']);
     $isBidCity = Bll_City::isBidCity($cityId);
     if ($isBidCity) {
         $pageParams['bidTip'] = '竞价';
     }
     $isChoiceCity = Bll_City::isChoiceCity($cityId);
     /** 精选城市 */
     if ($isChoiceCity) {
         $pageParams['bidTip'] = '精选';
     }
     $pageParams['isChoiceCity'] = $isChoiceCity;
     $pageParams['isBidCity'] = $isBidCity;
     $houseRank = Bll_Broker_Manage_AjkPropList::getHouseSollyResult(array($houseId));
     if (isset($houseRank[$houseId])) {
         $pageParams['houseRank'] = $houseRank[$houseId];
     } else {
         $pageParams['houseRank'] = '待评';
     }
     $houseSpreadDate = array();
     for ($interval = -6; $interval <= 0; $interval++) {
         $houseSpreadDate[] = date('m.d', strtotime("{$interval} day"));
     }
     $pageParams['houseSpreadDate'] = $houseSpreadDate;
     $fixPlanId = Bll_Plan_Fix_AjkPlan::getPlanIdByHouseId($brokerId, $houseId, $cityId);
     $startDate = date('Ymd', strtotime('-6 day'));
     $endDate = date('Ymd');
     $houseFixDailyCostList = array();
     for ($i = -6; $i <= 0; $i++) {
         $date = date('m.d', strtotime("{$i} day"));
         $houseFixDailyCostList[$date] = 0;
     }
     /** 获取房源指定日期内每天的定价点击 */
     if (Bll_Broker_HzBroker::isComboBroker($brokerId)) {
         $pageParams['houseFixSpreadClickInfoList'] = static::getHouseComboSpreadClickInfo($houseId);
     } else {
         $pageParams['houseFixSpreadClickInfoList'] = static::getHouseFixSpreadClickInfoEx($brokerId, $houseId);
         /** 获取房源指定日期内每天的定价花费 */
         $pageParams['houseFixDailyCostList'] = array_merge($houseFixDailyCostList, static::getHouseFixDailyCost($brokerId, $fixPlanId, $houseId, $startDate, $endDate));
     }
     if ($isChoiceCity || $isBidCity) {
         $houseBidSpreadInfo = static::getHouseBidSpreadInfo($houseId, $cityId);
         $pageParams['houseBidSpreadInfo'] = $houseBidSpreadInfo;
     }
     // $pageParams['houseDetail'] = Bll_Ppc_ServiceAPI::getHouseInfo($houseId);
     $houseImageInfo = Bll_Ppc_ServiceAPI::getHouseImageInfo($houseId);
     $pageParams['optimize'] = static::getHouseOptimizeInfo($houseId, $houseImageInfo, $houseInfo, $cityId);
     $pageParams['imageCount'] = count($houseImageInfo['imageBaseInfo']);
     if (count($houseImageInfo['imageBaseInfo']) <= 0) {
         $pageParams['houseDefaultImage'] = 'http://pages.anjukestatic.com/img/global/nopic_150x113.gif';
     } else {
         $pageParams['houseDefaultImage'] = static::getThumbImageUrl($houseId, $houseImageInfo['imageBaseInfo']);
     }
     $pageParams['houseStatisticsInfo'] = static::getHouseStatisticsInfo($houseId, $cityId, $houseInfo['commId'], $houseInfo['proPriceInt']);
     //市场分析,小区价格段供需比。获取前天的数据
     $pageParams['demandSupplyPriceInfo'] = static::getDemandSupplyByPriceInfo($houseInfo['commId']);
     //市场分析,小区户型供需比。获取前天数据
     $pageParams['demandSupplyRoomInfo'] = static::getCommTotalRoomInfo($houseInfo['commId']);
     $pageParams['subRegionRank'] = static::getCommunityRank($houseInfo['areaCode'], $houseInfo['commId']);
     return $pageParams;
 }
Ejemplo n.º 6
0
 public function handle_request_internal()
 {
     $brokerId = $this->_params['brokerId'];
     //经纪人信息
     $brokerInfo = Model_Broker_AjkBrokerExtend::findWithBrokerId($brokerId);
     if (!$brokerInfo) {
         throw new Exception_BrokerNotFoundException('经纪人不存在', Const_APIStatus::E_BROKER_NOT_EXISTS);
     }
     $communityList = array();
     $cityId = $brokerInfo->cityId;
     $hzBrokerId = Model_Broker_HzMapping::get_hz_broker_id($brokerId);
     if (Bll_Broker_HzBroker::isComboBroker($brokerId)) {
         /** 租房 */
         $comboList = Bll_Combo_HouseRelation::getHouseRelations($brokerId, Bll_Combo_HouseRelation::SITE_TYPE_HZ, 1);
         //套餐列表
         $propIds = array();
         foreach ($comboList as $combo) {
             $propIds[] = $combo['houseId'];
         }
         if ($propIds && $hzBrokerId) {
             $hzPropList = Model_House_HzPropSearch::getPropList($propIds, $hzBrokerId, $cityId);
             //房源信息
             foreach ($hzPropList as $list) {
                 //过滤无效房源
                 if (in_array($list['status'], array(Const_HzStatus::VERIFY, Const_HzStatus::REMOVE, Const_HzStatus::EXPIRED))) {
                     continue;
                 }
                 $row = array();
                 $row['commId'] = $list['commid'];
                 $row['commName'] = $list['commname'];
                 $communityList[$list['commid']] = $row;
             }
         }
         /** 二手房 */
         $comboSpreadHouseList = Bll_Broker_Combo_ManageAjk::getComboSpreadHouseList($brokerId, $cityId);
         if ($comboSpreadHouseList) {
             //获取房源信息
             $propIds = array_keys($comboSpreadHouseList);
             $propsInfo = Bll_House_EsfHouse::getHouseBaseInfo($propIds, $cityId);
             foreach ($propsInfo as $prop) {
                 $row = array();
                 $row['commId'] = $prop->commId;
                 $row['commName'] = $prop->commName;
                 $communityList[$prop->commId] = $row;
             }
         }
     } else {
         //定价的情况
         $brokerProps = Bll_Broker_HzBroker::getBrokerProps($brokerId, $cityId);
         // 获取房源关系列表
         if ($brokerProps['status']) {
             /** 租房*/
             $brokerProps = $brokerProps['msg'];
             $plans = $brokerProps['plans'][0];
             //定价计划
             $plannings = $brokerProps['plannings'];
             //计划房源关系
             $propsTemp = $brokerProps['props'];
             //定价房源
             if (empty($plans)) {
                 $hzPropList = array();
             } else {
                 $hzPropList = array();
                 foreach ($propsTemp as $prop) {
                     $hzPropList[$prop['proId']] = $prop;
                 }
                 foreach ($plannings as $key => $planning) {
                     // 非有效 过滤掉
                     if (!Bll_HzFixPlan::isValidPlanning($planning['isValid'])) {
                         unset($hzPropList[$planning['proId']]);
                     }
                 }
             }
             foreach ($hzPropList as $prop) {
                 $row = array();
                 $row['commId'] = $prop['commId'];
                 $row['commName'] = $prop['commName'];
                 $communityList[$prop['commId']] = $row;
             }
         }
         /** 二手房*/
         //获取经纪人有效定价计划  计划表
         $fixSpreadPlanList = Bll_Plan_Fix_AjkPlan::getBrokerPlanList($brokerId);
         $fixPlanId = $fixSpreadPlanList[0]['id'];
         //关系表中获取房源;
         if ($fixPlanId) {
             $relations = Model_Plan_AjkFixRelation::getRelationListByPlanId($fixPlanId, $cityId);
             $propIds = array();
             foreach ($relations as $relation) {
                 $propIds[] = $relation['proId'];
             }
             if ($propIds) {
                 $propsInfo = Bll_House_EsfHouse::getHouseBaseInfo($propIds, $cityId);
                 foreach ($propsInfo as $prop) {
                     $row = array();
                     $row['commId'] = $prop->commId;
                     $row['commName'] = $prop->commName;
                     $communityList[$prop->commId] = $row;
                 }
             }
         }
     }
     //对小区按首字母排序
     $communityList = $this->communitySortByCommCode($communityList);
     return array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => array('communityList' => array_values($communityList)));
 }
Ejemplo n.º 7
0
 public function handle_request_internal()
 {
     $request = APF::get_instance()->get_request();
     $houseIds = $request->get_parameter('propIds');
     /**
      * type: today, all
      */
     $type = $request->get_parameter('type');
     /**
      * plan_type: bid, fix
      */
     $planType = $request->get_parameter('plan_type');
     $rtn = array_fill_keys($houseIds, 0);
     if (strcasecmp($planType, 'fix') === 0) {
         /**
          * 定价房源点击量
          */
         if (strcasecmp($type, 'today') == 0 && !empty($houseIds)) {
             /**
              * 房源今日点击量
              */
             $date = date('Ymd');
             // $houseClickInfoList = Bll_Ppc_ServiceAPI::getHouseClickInfo($houseIds, strtotime(date('Y-m-d 00:00:00')), time(), static::$intBrokerID);
             $houseClickInfoList = Bll_Ppc_ServiceAPI::getHouseClickInfoNew(static::$intBrokerID, $houseIds, $date, $date);
             foreach ($houseClickInfoList as $houseClickInfo) {
                 $rtn[$houseClickInfo['propId']] += max(0, $houseClickInfo['clickNum']);
             }
             /**
              * 精选点击
              */
             $choiceClickList = Bll_Plan_Bid_AjkPlan::getHouseBidClick($houseIds, static::$intBrokerCityID, date('Ymd'));
             foreach ($choiceClickList as $houseId => $clickCount) {
                 $rtn[$houseId] += $clickCount;
             }
         } else {
             /**
              * 房源累计点击量
              */
             $fixPlanIdList = Bll_Plan_Fix_AjkPlan::getBrokerPlanList(static::$intBrokerID);
             if (empty($fixPlanIdList)) {
                 $rtn = array();
             } else {
                 $fixPlanId = $fixPlanIdList[0]['id'];
                 $houseClickInfoList = Bll_Ppc_ServiceAPI::propFixClickNum(static::$intBrokerID, $houseIds, $fixPlanId);
                 foreach ($houseClickInfoList as $houseClickInfo) {
                     $rtn[$houseClickInfo['propId']] = max(0, $houseClickInfo['clickNum']);
                 }
             }
             $houseChoiceClickList = Model_Choice_PropClickCount::getChoiceClickInfo(static::$intBrokerID, static::$intBrokerCityID, $houseIds);
             foreach ($houseChoiceClickList as $houseChoiceClick) {
                 $rtn[$houseChoiceClick['propId']] += $houseChoiceClick['count'];
             }
         }
     } else {
         /**
          * 竞价今日点击量
          */
         $rtn = Bll_Plan_Bid_AjkPlan::getHouseBidClick($houseIds, static::$intBrokerCityID, date('Ymd'));
     }
     echo json_encode($rtn, JSON_FORCE_OBJECT);
     return false;
 }
Ejemplo n.º 8
0
 public function handle_request_internal()
 {
     $brokerIds = explode(',', $this->_params['brokerIds']);
     $cityId = $this->_params['cityId'];
     $sinceId = isset($this->_params['sinceId']) ? intval($this->_params['sinceId']) : 0;
     //从$sinceId 行开始读
     $per = isset($this->_params['per']) ? $this->_params['per'] : 10;
     //每页示的条数
     //二手房 房源表查找房源信息 找出所有的 propIds
     $isComboCity = Bll_City::isComboCity($cityId);
     $propIds = array();
     if ($isComboCity) {
         //如果是套餐城市 套餐房源表中 批量获取经纪人在线房源
         $comboSpreadHouseList = Bll_Broker_Combo_ManageAjk::getComboSpreadHouseList($brokerIds, $cityId);
         $propIds = array_keys($comboSpreadHouseList);
         $status = 2;
         //2 套餐 1 定价
     } else {
         //如果是定价城市 获取经纪人定价计划--获取有效计划房源关系
         $fixSpreadPlanList = Bll_Plan_Fix_AjkPlan::getBrokerPlanList($brokerIds);
         //获取经纪人有效定价计划  计划表
         $fixSpreadPlanIds = array_keys($fixSpreadPlanList);
         //获取有效计划房源关系
         $relations = Bll_Plan_Fix_AjkPlan::getPropFixedPlanRelation($brokerIds, $cityId, $fixSpreadPlanIds);
         foreach ($relations as $relation) {
             $propIds[] = $relation['propId'];
         }
         $status = 1;
     }
     //获取房源信息  分页
     $propsInfos = Bll_House_EsfHouse::getHouseBaseInfo($propIds, $cityId, array(), $per + 1, $sinceId);
     //板块信息
     $blockCode = array();
     foreach ($propsInfos as $propsInfoVal) {
         $blockCode[] = substr($propsInfoVal['areaCode'], 8, 4);
     }
     $blockInfos = Bll_Community_CommunityGardener::getAreaBlock($blockCode);
     $hasNextPage = 0;
     //是否有下一页
     $brokerProps = array();
     if (!empty($propsInfos)) {
         $hasNextPage = count($propsInfos) > $per ? 1 : 0;
     }
     if ($hasNextPage) {
         array_pop($propsInfos);
         $sinceId += $per;
     } else {
         $sinceId = 0;
     }
     foreach ($propsInfos as $propsInfo) {
         $row = array();
         $row['brokerId'] = $propsInfo['brokerId'];
         $row['propId'] = $propsInfo['proId'];
         $row['cityId'] = $propsInfo['cityId'];
         $row['title'] = $propsInfo['proName'];
         $row['commId'] = $propsInfo['commId'];
         $row['commName'] = $propsInfo['commName'];
         $row['areaCode'] = $propsInfo['areaCode'];
         $row['blockName'] = $blockInfos[$row['areaCode']];
         $row['createTime'] = date("Y-m-d H:i:s", $propsInfo['postDate']);
         $row['room'] = $propsInfo['roomNum'];
         $row['hall'] = $propsInfo['hallNum'];
         $row['toilet'] = $propsInfo['toiletNum'];
         $row['area'] = $propsInfo['areaNum'];
         $row['areaUnit'] = '平米';
         $row['price'] = intval($propsInfo['proPrice']);
         $row['priceUnit'] = '万';
         //获取房源图片
         $houseImageInfo = Bll_Ppc_ServiceAPI::getHouseImageInfo($propsInfo['proId']);
         $houseImageBaseInfos = $houseImageInfo['imageBaseInfo'];
         $houseImageUrls = array();
         if ($houseImageBaseInfos) {
             foreach ($houseImageBaseInfos as $imageInfo) {
                 $houseImageUrls[] = Util_Image::getInstance()->getResizeURL($imageInfo['FILENAME'], $imageInfo['HOST_ID'], 420, 315);
             }
         }
         $row['imageUrls'] = $houseImageUrls;
         $row['status'] = $status;
         $brokerProps[] = $row;
     }
     return array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => array('brokerProps' => $brokerProps, 'hasNextPage' => $hasNextPage, 'sinceId' => $sinceId));
 }