当前位置: 首页>>代码示例>>PHP>>正文


PHP Model_Broker_AjkBrokerExtend::getCityIdByBrokerId方法代码示例

本文整理汇总了PHP中Model_Broker_AjkBrokerExtend::getCityIdByBrokerId方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_Broker_AjkBrokerExtend::getCityIdByBrokerId方法的具体用法?PHP Model_Broker_AjkBrokerExtend::getCityIdByBrokerId怎么用?PHP Model_Broker_AjkBrokerExtend::getCityIdByBrokerId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Model_Broker_AjkBrokerExtend的用法示例。


在下文中一共展示了Model_Broker_AjkBrokerExtend::getCityIdByBrokerId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handle_request_internal

 public function handle_request_internal()
 {
     header("Access-Control-Allow-Origin: *");
     $propId = $this->_params['propId'];
     //好丑陋。。。。。。好无奈。。。。。。
     //委托房源自动转发停用,为了app能够展示报错信息。。。
     if (empty($propId)) {
         $this->_params['apiDebug'] = 1;
         return array('status' => Const_APIStatus::RETURN_CODE_ERROR, 'errcode' => '0000', 'message' => '委托房源自动转发功能已停用;若要发布请手动发布');
     }
     $propInfo = Bll_Ppc_ServiceAPI::getHouseInfo($propId);
     $brokerId = $this->_params['brokerId'];
     $houseInfo = Model_House_EsfHouseElementFactory::getHouseBaseInfo($propId);
     if (empty($houseInfo)) {
         $cityId = Model_Broker_AjkBrokerExtend::getCityIdByBrokerId($this->_params['brokerId']);
         $houseInfo = Bll_House_EsfHouse::getHouseBaseInfo($propId, $cityId);
     }
     if (!empty($houseInfo)) {
         $result['status'] = 'ok';
         $areaCode = $houseInfo['areaCode'];
         $block = Bll_Commtype_Api::getInfoByTypeCode($areaCode);
         $area = Bll_Commtype_Api::getInfoByTypeId($block['parentId']);
         $area_name = $area['typeName'];
         $block_name = $block['typeName'];
         $data['title'] = $houseInfo['proName'];
         $data['commId'] = $houseInfo['commId'];
         $data['commName'] = $houseInfo['commName'];
         //小区信息
         $commInfo = Bll_Community_APIComm::getInstance()->getInfoByIdMapping($data['commId'], 2);
         $data['commLocation'] = $commInfo['commLocal'];
         $data['sosolat'] = $commInfo['sosolat'];
         //纬度
         $data['sosolng'] = $commInfo['sosolng'];
         //经度
         $data['floor'] = $propInfo['property']['ProFloor'];
         $data['totalFloor'] = $propInfo['property']['FloorNum'];
         $propDescription = $propInfo['property']['sale']['AddExplan'];
         $propDescription = str_replace('<p>', "", $propDescription);
         $propDescription = str_replace('</p>', "", $propDescription);
         $propDescription = trim($propDescription);
         $data['propDescription'] = $propDescription;
         $data['areaname'] = $area_name;
         $data['blockname'] = $block_name;
         $data['roomNum'] = $houseInfo['roomNum'];
         $data['hallNum'] = $houseInfo['hallNum'];
         $data['toiletNum'] = $houseInfo['toiletNum'];
         $data['area'] = $houseInfo['areaNum'];
         $data['areaUnit'] = '平米';
         $data['price'] = $houseInfo['proPrice'];
         $data['priceUnit'] = '万';
         $data['isMoreImg'] = $houseInfo['isHighQulity'];
         $data['isVisible'] = $houseInfo['isVisible'];
         $data['isPhonePub'] = $houseInfo['uriCode'] == 'mobile.asyn' || $houseInfo['uriCode'] == 'mobile-ajk-broker.asyn' ? 1 : 0;
         $data['propImagesUrl'] = array();
         $data['propImages'] = $data['outdoorImage'] = array();
         if ($propInfo['attachments']['attachments']) {
             $propImageNum = 0;
             $outdoorImageNum = 0;
             $images = $propInfo['attachments']['attachments'];
             foreach ($images as $image) {
                 if ($image['DataType'] == 2) {
                     if ($propImageNum >= 8) {
                         continue;
                     }
                     $imageInfo = array();
                     $url = Util_ImageUtils::getResizeURL($image['FileName'], $image['host_id'], 600, 600);
                     $url = str_replace("display", "display/e", $url);
                     $imageInfo['bigImageUrl'] = $url;
                     $data['propImages'][] = $imageInfo;
                     $propImageNum += 1;
                 } else {
                     if ($image['DataType'] == 3) {
                         if ($outdoorImageNum >= 1) {
                             continue;
                         }
                         $imageInfo = array();
                         $url = Util_ImageUtils::getResizeURL($image['FileName'], $image['host_id'], 600, 600);
                         $url = str_replace("display", "display/e", $url);
                         $imageInfo['bigImageUrl'] = $url;
                         $data['outdoorImage'][] = $imageInfo;
                         $outdoorImageNum += 1;
                     }
                 }
             }
         }
         $spread = Model_Plan_AjkPropspread::getAjkPropSpreadByIds($propId);
         $data['isChoice'] = $data['isBid'] = 0;
         if (!empty($spread)) {
             if ($spread[0]['bidVersion'] == 1 && $spread[0]['status'] == 1) {
                 $data['isBid'] = 1;
             } elseif ($spread[0]['bidVersion'] == 2 && ($spread[0]['status'] == 1 || $spread[0]['status'] == 11)) {
                 $data['isChoice'] = 1;
             }
         }
         //计算出房源推广天数
         $timeFixStr = strtotime(date("Ymd", $houseInfo['postDate']));
         $leftDay = floor((time() - $timeFixStr) / 86400);
         $data['publishDaysMsg'] = $leftDay > 0 ? $leftDay . '天前发布' : '今天发布';
         $imgBll = Bll_Image_EsfHouseImage::getInstance();
         $data['imgUrl'] = $imgBll->getThumbImageUrl($propId, $houseInfo['commId']);
//.........这里部分代码省略.........
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:101,代码来源:Summary.php

示例2: notifySolrUpDown

 /**
  * 精选该上没上,该下没下
  *
  * @param array $queue
  * @return array
  */
 public static function notifySolrUpDown($queue)
 {
     $params = array();
     $params['houseId'] = $queue['proId'];
     $params['plan_id'] = 0;
     $params['ajk_broker_id'] = $queue['brokerId'];
     $params['city_id'] = 0;
     $params['changeType'] = 412;
     $houseChoicePlan = Model_Plan_Jp::getChoicePlanByHouseIdEx($queue['proId']);
     if (empty($houseChoicePlan)) {
         $remark = sprintf('房源[%d]没有获取到精选计划信息', $queue['proId']);
         $params['city_id'] = Model_Broker_AjkBrokerExtend::getCityIdByBrokerId($queue['brokerId']);
         $params['type'] = Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_DOWN;
         $data = self::buildPropLog($params, $remark, 0);
         Model_Log_HouseLogNew::create($data, date('Ymd'))->save();
         return Bll_HzPropBll::build_return(1, $remark);
     }
     $params['city_id'] = $houseChoicePlan['cityId'];
     $params['plan_id'] = $houseChoicePlan['id'];
     if ($houseChoicePlan['status'] == Model_Plan_Jp::ENUM_STATUS_ONLINE) {
         $params['type'] = Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_UP;
         $remark = sprintf('房源[%d]精选计划[%d]在推广中', $queue['proId'], $houseChoicePlan['id']);
         $data = self::buildPropLog($params, $remark, 0);
         Model_Log_HouseLogNew::create($data, date('Ymd'))->save();
         return Bll_HzPropBll::build_return(1, $remark);
     }
     $params['type'] = Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_DOWN;
     $remark = sprintf('房源[%d]精选计划[%d - %d]不在推广中', $queue['proId'], $houseChoicePlan['id'], $houseChoicePlan['status']);
     $data = self::buildPropLog($params, $remark, 0);
     Model_Log_HouseLogNew::create($data, date('Ymd'))->save();
     return Bll_HzPropBll::build_return(1, $remark);
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:38,代码来源:JpChoice.php

示例3: notifySolrUpDown

 /**
  * 写房源日志,通知solr下架房源
  *
  * @param array $queue
  * @return array
  */
 public static function notifySolrUpDown($queue)
 {
     $propPlanning = Model_Plan_HzPlanning::getPropBidPlan($queue['proId']);
     if (empty($propPlanning)) {
         $queue['cityId'] = Model_Broker_AjkBrokerExtend::getCityIdByBrokerId($queue['brokerId']);
         return static::notifySolr($queue, Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_DOWN, '没有获取到房源精选关系-下架');
     }
     $planId = $propPlanning['plan_id'];
     $planInfo = Model_Plan_HzPlanBasic::get_plan_by_id($planId);
     if (empty($planInfo)) {
         return static::notifySolr($queue, Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_DOWN, '没有获取到房源精选计划-下架');
     }
     $queue['planId'] = $planId;
     $queue['cityId'] = $planInfo['cityId'];
     if ($planInfo['status'] == Const_HzPlan::SPREAD) {
         return static::notifySolr($queue, Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_UP, '精选推广-上架');
     }
     return static::notifySolr($queue, Const_ProLogType::LOG_CHOICE_NOFITY_SOLR_DOWN, '精选推广-下架');
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:25,代码来源:HzChoice.php

示例4: notifySolrUpDown

 /**
  * 二手房精选该上没上,改下没下
  *
  * @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);
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:33,代码来源:AjkChoice.php


注:本文中的Model_Broker_AjkBrokerExtend::getCityIdByBrokerId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。