예제 #1
0
 public function handle_request_internal()
 {
     if (!$this->isBrokerLogin()) {
         $this->redirect_to_login();
     }
     /**
      * @var $request AJKRequest
      */
     $request = APF::get_instance()->get_request();
     /**
      * @var $response AJKResponse
      */
     $response = APF::get_instance()->get_response();
     $params = $this->getParameters();
     $routeMatches = $request->get_router_matches();
     $business = $routeMatches[1];
     $cityId = $request->getBrokerCityId();
     //增加个人房源审核城市
     if (in_array($cityId, array(11))) {
         $this->setAttribute('propCheck', 0);
     } else {
         $this->setAttribute('pageType', 1);
     }
     $brokerId = $request->getBrokerId();
     $response->set_content_type('text/html', 'utf-8');
     if (Bll_Broker_HzBroker::isComboBroker($brokerId)) {
         $this->redirect('/ajkbroker/combo/broker/manage/' . $business . '/');
     }
     /**
      * 三网统一Controller入口,但是业务实现层使用各自的。
      * @link http://php.net/manual/zh/language.types.callable.php
      */
     $businessCallback = array('ajk' => array('Bll_Broker_Manage_AjkPropList', 'getBrokerSpreadInfo'), 'hz' => array('Bll_Broker_Manage_HzPropList', 'handlerPropListRequest'), 'jp' => array());
     if (!isset($businessCallback[$business])) {
         $this->redirect(sprintf('/ajkbroker/user/manage/proplist/ajk/?%s', http_build_query(array('err' => '地址错误'))));
     }
     /**
      * 调用三网业务回调函数
      * @link http://php.net/manual/zh/function.call-user-func.php
      */
     $pageParams = call_user_func($businessCallback[$business], $this, $request, $response);
     if (false === $pageParams) {
         $this->redirect(sprintf('/ajkbroker/user/manage/proplist/ajk/?%s', http_build_query(array('err' => '系统繁忙'))));
     }
     $this->setAttributes($pageParams);
     $this->setAttribute('pageType', $business);
     $this->setAttribute('business', $business);
     $this->setAttribute('broker', self::$BrokerInfo);
     /**
      * 添加委托房源信息栏
      * add by xiongjianxu
      */
     $areaCode = $this->getBrokerAreaCode(self::$BrokerInfo['BaseInfo']);
     $this->getCommissionInfo($brokerId, $cityId, $areaCode, 1);
     //echo '<!--- ', PHP_EOL, print_r($pageParams, true), PHP_EOL, ' --->';
     //获取一元精选的配置
     $isUnitaryChoice = Bll_Stats_DaUploadUnitarySiteCommPriceDaily::getUnitaryChoiceConfig($cityId);
     $this->setAttribute('isUnitaryChoice', $isUnitaryChoice);
     if ($business == 'ajk') {
         return "Manage_ProplistAjk";
     } else {
         return "Manage_Proplist";
     }
 }
예제 #2
0
 public function handle_request_internal()
 {
     if (!$this->isBrokerLogin()) {
         $this->redirect_to_login();
     }
     /**
      * @var $request AJKRequest
      */
     $request = APF::get_instance()->get_request();
     $response = APF::get_instance()->get_response();
     $params = $this->getParameters();
     $routeMatches = $request->get_router_matches();
     $business = $routeMatches[1];
     $cityId = $request->getBrokerCityId();
     /** 判断是否是精选开放城市 */
     $siteType = $business == 'ajk' ? Const_Site::ANJUKE : ($business == 'hz' ? Const_Site::HAOZU : Const_Site::JINPU);
     if (!Bll_City::isChoiceIndependentCity($cityId, $siteType)) {
         $this->redirect('/ajkbroker/combo/broker/manage/' . $business . '/?from=V2');
     }
     $brokerId = $request->getBrokerId();
     $response->set_content_type('text/html', 'utf-8');
     if (!Bll_Broker_HzBroker::isComboBroker($brokerId)) {
         if ($business == 'jp') {
             $this->redirect('/jinpu/house/managementv3');
         } else {
             $this->redirect('/ajkbroker/user/manage/proplist/' . $business . '/');
         }
     }
     /**
      * 三网统一Controller入口,但是业务实现层使用各自的。
      */
     $businessCallback = array('ajk' => array('Bll_Broker_Combo_ManageAjk', 'getComboInfo'), 'hz' => array('Bll_Broker_Combo_ManageHz', 'getComboInfo'), 'jp' => array('Bll_Broker_Combo_ManageJp', 'getComboInfo'));
     if (!isset($businessCallback[$business])) {
         $this->redirect(sprintf('/ajkbroker/user/manage/proplist/ajk/?%s', http_build_query(array('err' => '地址错误'))));
     }
     /**
      * 调用三网业务回调函数
      * @link http://php.net/manual/zh/function.call-user-func.php
      */
     $pageParams = call_user_func($businessCallback[$business], $this, $request, $response);
     //echo "<pre>";print_r($pageParams);exit;
     if (false === $pageParams) {
         $this->redirect(sprintf('/ajkbroker/user/manage/proplist/ajk/?%s', http_build_query(array('err' => '系统繁忙'))));
     }
     $this->setAttributes($pageParams);
     $this->setAttribute('pageType', $business);
     $this->setAttribute('business', $business);
     $this->setAttribute('broker', self::$BrokerInfo);
     /**
      * 添加委托房源信息栏
      * add by xiongjianxu
      */
     $areaCode = $this->getBrokerAreaCode(self::$BrokerInfo['BaseInfo']);
     $this->getCommissionInfo($brokerId, $cityId, $areaCode, 1);
     //echo '<!--- ', PHP_EOL, print_r($pageParams, true), PHP_EOL, ' --->';
     //获取一元精选的配置
     $isUnitaryChoice = Bll_Stats_DaUploadUnitarySiteCommPriceDaily::getUnitaryChoiceConfig($cityId);
     $this->setAttribute('isUnitaryChoice', $isUnitaryChoice);
     //判断房源季活动是否开始
     $activityStatus = Bll_City_BizType::isOnActivity($cityId, 4, Const_CityBizType::TYPE_ACTIVITY_RES);
     $this->setAttribute('activityStatus', $activityStatus);
     if ($business == 'ajk') {
         return 'Combo_Broker_HouseManageAjkV2';
     } else {
         return 'Combo_Broker_HouseManageV2';
     }
 }
예제 #3
0
 /**
  * 初始化一元精选房源
  *
  * @param array $groupCommunityPriceSegmentList
  * @param array $bucketInfoList
  * @return array
  */
 private function initUnitaryHouse($groupCommunityPriceSegmentList, $bucketInfoList)
 {
     $result = array();
     foreach ($groupCommunityPriceSegmentList as $key => $propIds) {
         if ($bucketInfoList[$key] == false) {
             continue;
         }
         list($communityId, $priceId) = explode('_', $key);
         $cityId = APF::get_instance()->get_request()->getBrokerCityId();
         $row = Bll_Stats_DaUploadUnitarySiteCommPriceDaily::getLastRowByCommIdAndSpIdV2($communityId, $priceId, $cityId);
         if (empty($row)) {
             continue;
         }
         $result = array_merge($result, $propIds);
     }
     return $result;
 }