コード例 #1
0
 public function handle_request_internal()
 {
     /*
     @params planId :计划id
     @params resType :默认为0,0表示不取计划房源信息,1为取房源信息
     @params from :来源
     @success return 该计划id的信息
     */
     if (!isset($this->_params['brokerId'])) {
         return Util_MobileAPI::error(Const_APIStatus::E_PLAN_PARAM_BROKERID_MISS);
     }
     if (!isset($this->_params['planId'])) {
         return Util_MobileAPI::error(Const_APIStatus::E_PLAN_PARAM_ERR1);
     }
     //根据安居客经纪人ID获取好租经纪人ID
     $brokerId_hz = Bll_HzBroker::get_brokerid_by_ajk_brokerid($this->_params['brokerId']);
     $result = Bll_HzFixPlan::get_plan_detail($brokerId_hz, $this->_params['cityId'], $this->_params['planId'], true);
     if (!empty($result)) {
         $return = array();
         $return["status"] = "ok";
         if (!empty($result['property'])) {
             foreach ($result['property'] as $propertyList) {
                 foreach ($propertyList['props'] as $propinfo) {
                     $proprow["id"] = $propinfo['proid'];
                     $proprow["type"] = $propinfo['content_basic']['protype'];
                     $proprow["area"] = round($propinfo['content_basic']['areanum']);
                     $proprow["commId"] = $propinfo['content_basic']['commid'];
                     $proprow["commName"] = $propinfo['content_basic']['commname'];
                     $proprow["hallNum"] = $propinfo['content_basic']['hallnum'];
                     $proprow["price"] = round($propinfo['content_basic']['pricenum']);
                     $proprow["priceUnit"] = "元";
                     $proprow["roomNum"] = $propinfo['content_basic']['roomnum'];
                     $proprow["title"] = $propinfo['content_basic']['title'];
                     $proprow["toiletNum"] = $propinfo['content_basic']['toilnetnum'];
                     $proprow["clickNum"] = $propinfo['fix_click'];
                     $proprow["isBid"] = $propinfo['is_bid'];
                     if ($propinfo['content_basic']['quality']) {
                         $proprow["isMoreImg"] = 1;
                         //多图
                     } else {
                         $proprow["isMoreImg"] = 0;
                     }
                     $result['propertyList'][] = $proprow;
                     unset($proprow);
                 }
             }
             unset($result['property']);
         }
         $return['data'] = $result;
         $cityTop = Bll_HzFixPlan::get_citytop($this->_params['cityId']);
         //播种城市
         if (!empty($cityTop)) {
             $fixPlanPropCeiling = round($cityTop['money'] / 100, 2);
             $return['data']['plan']['fixPlanPropCeiling'] = $fixPlanPropCeiling ? $fixPlanPropCeiling : 0;
         }
     } else {
         return Util_MobileAPI::error(Const_APIStatus::E_PLAN_PARAM_ERR);
     }
     return $return;
 }
コード例 #2
0
 public function handle_request_internal()
 {
     /*
     @params planId :计划id
     @params resType :默认为0,0表示不取计划房源信息,1为取房源信息
     @params from :来源
     @success return 该计划id的信息
     */
     if (!isset($this->_params['brokerId'])) {
         return Util_MobileAPI::error(Const_APIStatus::E_PLAN_PARAM_BROKERID_MISS);
     }
     if (!isset($this->_params['planId'])) {
         return Util_MobileAPI::error(Const_APIStatus::E_PLAN_PARAM_ERR1);
     }
     //根据安居客经纪人ID获取好租经纪人ID
     $brokerId_hz = Bll_HzBroker::get_brokerid_by_ajk_brokerid($this->_params['brokerId']);
     $result = Bll_HzFixPlan::get_plan_detail($brokerId_hz, $this->_params['cityId'], $this->_params['planId'], true);
     if (!empty($result)) {
         $return = array();
         $return["status"] = "ok";
         $return['data'] = $result;
     } else {
         return Util_MobileAPI::error(Const_APIStatus::E_PLAN_PARAM_ERR);
     }
     return $return;
 }