Ejemplo n.º 1
0
 public function before()
 {
     //防止端口城市对pp城市接口的访问
     //接受参数:判断是否是套餐经纪人,是报错,不是,继续执行
     $request_body = file_get_contents('php://input');
     if ($request_body) {
         $res = json_decode($request_body, true);
         if (is_array($res)) {
             foreach ($res as $k => $v) {
                 $_REQUEST[$k] = $v;
             }
         }
     }
     $params = $_REQUEST;
     $brokerId = $params['brokerId'];
     if (empty($brokerId)) {
         echo json_encode(Util_MobileAPI::error(Const_APIStatus::E_BROKER_PARAM_MISS));
         return self::STEP_EXIT;
     }
     $brokerInfo = Model_Broker_AjkBrokerExtend::findWithBrokerId($brokerId);
     if (empty($brokerInfo)) {
         echo json_encode(Util_MobileAPI::error(Const_APIStatus::E_BROKER_PARAM_MISS));
         return self::STEP_EXIT;
     }
     $isComboCity = Bll_Combo_HouseRelation::isComboCity($brokerInfo->cityId);
     if ($isComboCity['code'] == 200) {
         if ($isComboCity['data']) {
             echo json_encode(Util_MobileAPI::error(Const_APIStatus::E_BROKER_ISNOT_PPC));
             return self::STEP_EXIT;
         }
     }
     return self::STEP_CONTINUE;
 }
Ejemplo n.º 2
0
 public function handle_request_internal()
 {
     $business = $this->_params['business'];
     switch ($business) {
         case 'combo':
             $payType = 9999;
             break;
         default:
             $payType = 9999;
     }
     $brokerId = $this->_params['brokerId'];
     $brokerInfo = Model_Broker_AjkBrokerExtend::findWithBrokerId($brokerId);
     $cityId = $brokerInfo['cityId'];
     $comboInfo = Bll_Combo_HouseRelation::isComboCity($cityId);
     if ($comboInfo['data']) {
         $timeBool = Model_Combo_BusinessUseConfig::getCityComboConfig($cityId);
         if (!empty($timeBool) && time() < $timeBool['startTime']) {
             //切换套餐 数据处理完成之前 不允许切换经纪人paytype
             return array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => array('message' => '切换失败,城市尚未开放套餐'));
         }
         $brokerInfo->payType = $payType;
         if ($brokerInfo->save()) {
             $result = array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => array('message' => '切换成功'));
         } else {
             $result = array('status' => 'error', 'errcode' => __LINE__, 'message' => '切换失败');
         }
     } else {
         $result = array('status' => 'error', 'errcode' => __LINE__, 'message' => '非套餐城市');
     }
     return $result;
 }
Ejemplo n.º 3
0
 public function handle_request_internal()
 {
     $brokerId = $this->_params['brokerId'];
     $cityId = $this->_params['cityId'];
     $commId = $this->_params['commId'];
     //判断是否试端口城市
     $isComboCity = Bll_Combo_HouseRelation::isComboCity($this->_params['cityId']);
     if ($isComboCity['status'] != 'ok') {
         throw new Exception_Base("JAVA API ERROR");
     }
     if ($isComboCity['data']) {
         $return = $this->getComboPropsInOneComm($brokerId, $cityId, $commId);
     } else {
         $return = $this->getPpcPropsInOneComm($brokerId, $cityId, $commId);
     }
     return $return;
 }
Ejemplo n.º 4
0
 /**
  * 判断给定房源是否在线上推广
  * @param $brokerId 二手房经纪人ID
  * @param $cityId 城市ID
  * @param $type 类型,二手房或者租房或者商业地产
  * @param $filterProIds
  * @param array $updateTimeArr
  * @param array $newFixedProInfos
  * @return array
  */
 public function filterProIds($brokerId, $cityId, $type, $filterProIds, &$updateTimeArr = array(), &$newFixedProInfos = array())
 {
     //判断是否是套餐城市
     $isCombo = Bll_Combo_HouseRelation::isComboCity($cityId);
     if ($type == Const_ShowcaseOrders::SALE_DB) {
         //二手房
         //经纪人计划信息
         if ($isCombo['data']) {
             //套餐城市
             $comboList = Bll_Combo_HouseRelation::getHouseRelations($brokerId, Bll_Combo_HouseRelation::SITE_TYPE_AJK, 1);
             foreach ($comboList as $comboVal) {
                 $uTime = strtotime($comboVal['updateTime']);
                 $newFixedProInfos[$comboVal['houseId']] = array($comboVal['houseId'], $uTime);
                 $updateTimeArr[$comboVal['houseId']] = $uTime;
             }
         } else {
             //PPC城市
             $brokerPlanInfo = BLL_Plan_EsfPropFixedPlanRelation::get_instance()->getBrokerEsfOnlinePlan($brokerId);
             if (empty($brokerPlanInfo)) {
                 return array();
             }
             //计划ID
             $planIds = array();
             foreach ($brokerPlanInfo as $brokerPlanVal) {
                 $planIds[] = $brokerPlanVal->id;
             }
             //定价推广房源
             $fixedProInfos = Bll_Fixedspread_AjkFixedSpread::getFixedOnlineProByPlanIds($cityId, $planIds);
             if (empty($fixedProInfos)) {
                 return array();
             }
             foreach ($fixedProInfos as $fixedProVal) {
                 $uTime = strtotime($fixedProVal->updatedDateTime);
                 $newFixedProInfos[$fixedProVal->proId] = array($fixedProVal->proId, $uTime);
                 $updateTimeArr[$fixedProVal->proId] = $uTime;
             }
         }
     } elseif ($type == Const_ShowcaseOrders::RENT_DB) {
         //如果是租房
         if ($isCombo['data']) {
             //套餐城市
             $comboList = Bll_Combo_HouseRelation::getHouseRelations($brokerId, Bll_Combo_HouseRelation::SITE_TYPE_HZ, 1);
             foreach ($comboList as $comboVal) {
                 $uTime = strtotime($comboVal['updateTime']);
                 $newFixedProInfos[$comboVal['houseId']] = array($comboVal['houseId'], $uTime);
                 $updateTimeArr[$comboVal['houseId']] = $uTime;
             }
         } else {
             //PPC城市
             $hzBrokerId = intval(Bll_Broker_BrokerCheckInfo::getHzBrokerIdByAjkBrokerId($brokerId));
             //定价房源信息
             $fixedProInfos = Bll_House_FixedPro::getInstance()->getBrokerHzFiexdProInfo($hzBrokerId);
             if (empty($fixedProInfos)) {
                 return array();
             }
             foreach ($fixedProInfos as $fixedProVal) {
                 $newFixedProInfos[$fixedProVal->proid] = array($fixedProVal->proid, $fixedProVal->created);
                 $updateTimeArr[$fixedProVal->proid] = $fixedProVal->created;
             }
         }
     }
     //判断需要过滤的房源ID是否在推广房源信息中
     if (!empty($filterProIds)) {
         foreach ($filterProIds as $filterProKey => $filterProId) {
             if (empty($newFixedProInfos[$filterProId])) {
                 //不在在线推广房源中,则释放
                 unset($filterProIds[$filterProKey]);
             } else {
                 //过滤ID,因为补充逻辑肯定是补充不在过滤ID中的房源
                 unset($newFixedProInfos[$filterProId]);
                 unset($updateTimeArr[$filterProId]);
             }
         }
     }
     return $filterProIds;
 }
Ejemplo n.º 5
0
 /**
  * 获取租房房源数据
  * [getBrokerEsfPro description]
  */
 private function getBrokerZfPro()
 {
     $data = $proClickInfo = array();
     $isCombo = Bll_Combo_HouseRelation::isComboCity($this->cityId);
     if ($isCombo['data']) {
         $comboList = Bll_Combo_HouseRelation::getHouseRelations($this->brokerId, Bll_Combo_HouseRelation::SITE_TYPE_HZ, 1);
         $proIds = $this->getObjFieldInfo($comboList, 'houseId');
         $clicksInfo = Bll_Ppc_NewPackageStatsBrokerDay::getHouseComboClickInfo($proIds, date('Ymd'), Model_Ppc_NewPackageStatsHouseDay::SITE_TYPE_HZ);
         if (!empty($clicksInfo)) {
             foreach ($clicksInfo as $val) {
                 if (isset($proClickInfo[$val['propId']])) {
                     $proClickInfo[$val['propId']] += intval($val['cnum']);
                 } else {
                     $proClickInfo[$val['propId']] = intval($val['cnum']);
                 }
             }
         }
     } else {
         $hzBrokerId = Bll_Broker_BrokerCheckInfo::getHzBrokerIdByAjkBrokerId($this->brokerId);
         //定价房源信息
         $fixedProInfos = Bll_House_FixedPro::getInstance()->getBrokerHzFiexdProInfo($hzBrokerId);
         if (empty($fixedProInfos)) {
             $this->outData($data, 1);
         }
         $proIds = $this->getObjFieldInfo($fixedProInfos, 'proid');
         //房源点击量信息
         $proClicks = Bll_House_HzPro::getInstance()->getProClicks($proIds, array(), date('Ymd'));
         if (!empty($proClicks)) {
             //将房源ID作为key拼接点击量信息
             foreach ($proClicks as $proClickVal) {
                 $proClickInfo[$proClickVal['proid']] = intval($proClickVal['cnt']);
             }
         }
     }
     $proInfos = Bll_House_HzPro::getInstance()->getBrokerHzProInfo($proIds, $this->cityId);
     if (empty($proInfos)) {
         $this->outData($data, 1);
     }
     //经纪人橱窗房源设置信息
     $adProInfos = Bll_Broker_ShowcaseAdSetPro::getInstance()->getBrokerAdRentPropInfo($this->brokerId);
     $addPro = array();
     if (!empty($adProInfos)) {
         foreach ($adProInfos as $adProVal) {
             $addPro[$adProVal->propId] = true;
         }
     }
     //房源主表信息
     $propMianInfo = Bll_House_HzPro::getInstance()->getHzProInfoByIds($proIds);
     $propMianNew = array();
     foreach ($propMianInfo as $propMianVal) {
         $propMianNew[$propMianVal->propId]['contentBasic'] = json_decode($propMianVal->contentBasic, true);
         $propMianNew[$propMianVal->propId]['contentOther'] = json_decode($propMianVal->contentOther, true);
     }
     $this->initZfProData($proInfos, $proClickInfo, $addPro, $propMianNew);
 }
Ejemplo n.º 6
0
 public function handle_request_internal()
 {
     if (!Bll_City::isShowCaseCity(static::$intBrokerCityID)) {
         $this->redirect('/user/combo/brokerhome');
         exit;
     }
     //获取经纪人id
     $objRequest = APF::get_instance()->get_request();
     $cityid = self::$BrokerInfo['BaseInfo']['CITYID'];
     $objRequest->set_attribute('PayType', self::$BrokerInfo['BaseInfo']['PAYTYPE']);
     $isCombo = Bll_Combo_HouseRelation::isComboCity($cityid);
     $tmp = array('cityId' => $cityid, 'status' => 1, 'startDate' => date('Ymd'));
     $cityPrice = Bll_Broker_ConfigCityPrice::getInstance()->getCityPrice($tmp, Const_ShowcaseOrders::RENT_DB);
     $todayPrice = round($cityPrice->discountPrice / 100, 2);
     $intBrokerID = $objRequest->getBrokerId();
     //好租经纪人ID
     $hzBrokerId = Bll_Broker_BrokerCheckInfo::getHzBrokerIdByAjkBrokerId($intBrokerID);
     $userId = $objRequest->getUserId();
     $data = array('brokerId' => $intBrokerID);
     $orderinfo = Bll_Broker_ShowcaseOrders::getInstance()->getBrokerOrders($data, $this->db);
     //判断经纪人是否有订单
     if (!$orderinfo) {
         $this->toManage('/ajkbroker/showcase/zf/');
     }
     $lavedays = ceil((strtotime($orderinfo->endDate) - strtotime(date('Ymd'))) / 3600 / 24);
     if ($orderinfo->isStop == 1 || $lavedays < 0) {
         $order_status = 'stop';
     } else {
         $objRequest->set_attribute('lavedays', $lavedays);
         $objRequest->set_attribute('lastday', date('Y-m-d', strtotime($orderinfo->endDate)));
         $order_status = 'open';
     }
     //获取参数值
     $params = APF::get_instance()->get_request()->get_parameters();
     $days = intval($params['days']);
     //status=2是停止,status=1是续费
     if ($params['status'] == 2) {
         if ($orderinfo->isStop == 0) {
             $stopstatus = Bll_Broker_ShowcaseOrders::getInstance()->stopBrokerOthers($orderinfo, $cityPrice->discountPrice, $this->db);
             if ($stopstatus['status']) {
                 $this->toManage();
             } else {
                 $this->toError($stopstatus['msg']);
             }
         } else {
             $msg = '订单类型不能操作';
             $this->toError($msg);
         }
     } elseif ($params['status'] == 1 && $days >= 1) {
         $BrokerMoney = Bll_Broker_ShowcaseOrders::getInstance()->getBrokerMoney($userId);
         if ($BrokerMoney < $todayPrice) {
             $this->toError(Const_ShowcaseOrders::MONEY_NOT_ENOUGH);
         }
         $Continueorder = Bll_Broker_ShowcaseOrders::getInstance()->continueBrokerOthers($orderinfo, $days, $cityPrice->discountPrice, $this->db);
         if ($Continueorder['status']) {
             $this->toManage();
         } else {
             $this->toError($Continueorder['msg']);
         }
     } elseif ($params['status'] == 3) {
         if (!empty($params['rooms'])) {
             $proIds = explode(';', $params['rooms']);
             $filterProIds = Bll_Broker_ShowcaseAdSetPro::getInstance()->filterProIds($intBrokerID, $cityid, $this->db, $proIds);
             //有些房源不在线上展示
             if (count($filterProIds) != count($proIds)) {
                 $this->toError('有些房源没在线上推广,操作失败!');
             }
             $res = Bll_Broker_ShowcaseAdSetPro::getInstance()->insertAdProsInfo($intBrokerID, $cityid, $proIds, $this->db);
             if (!$res['status']) {
                 $this->toError($res['msg']);
             } else {
                 //插入成功,跳转至管理页面
                 if ($orderinfo->isStop == 0) {
                     $log = array();
                     $log['brokerId'] = $orderinfo->brokerId;
                     $log['cityId'] = $orderinfo->cityId;
                     $log['endDate'] = $orderinfo->endDate;
                     $log['startDate'] = $orderinfo->startDate;
                     $log['opType'] = Const_ShowcaseOrders::OPTYPE_6;
                     $log['totalDays'] = ceil((strtotime($orderinfo->endDate) - strtotime($orderinfo->startDate)) / 3600 / 24) + 1;
                     $log['createTime'] = time();
                     Bll_Broker_ShowcaseOrders::getInstance()->insertSetLog($log, $this->db);
                 }
                 $this->toManage();
             }
         }
     }
     $orderCreated = date('Ymd', $orderinfo->createTime);
     if ($orderCreated < date('Ymd')) {
         $click = Bll_Broker_ShowcaseOrders::getInstance()->getBrokerClick($intBrokerID, date('Ymd', strtotime('-1 days')), $this->db);
         if (!$click->quantityCount) {
             $objRequest->set_attribute('YClick', 0);
         } else {
             $objRequest->set_attribute('YClick', $click->quantityCount);
         }
         $objRequest->set_attribute('IS_YClick', true);
     }
     if ($isCombo['data']) {
         $comboList = Bll_Combo_HouseRelation::getHouseRelations($intBrokerID, Bll_Combo_HouseRelation::SITE_TYPE_HZ, 1);
         if (!empty($comboList)) {
             if (count($comboList) >= Const_ShowcaseOrders::SALE_PRO_MAX_COUNT) {
                 $fixedProInfosCnt = Const_ShowcaseOrders::SALE_PRO_MAX_COUNT;
             } else {
                 $fixedProInfosCnt = count($comboList);
             }
         } else {
             $fixedProInfosCnt = 0;
         }
         $proInfo = Bll_Broker_ShowcaseAdSetPro::getInstance()->getBrokerAdRentPropInfo($intBrokerID);
         $proIds = Bll_Broker_ShowcaseOrders::getInstance()->getObjFieldInfo($proInfo, 'propId');
         $proInfos = Bll_House_HzPro::getInstance()->getBrokerHzProInfo($proIds, $cityid);
         $propMianInfo = Bll_House_HzPro::getInstance()->getHzProInfoByIds($proIds);
         $propMianNew = array();
         foreach ($propMianInfo as $propMianVal) {
             $propMianNew[$propMianVal->propId]['contentBasic'] = json_decode($propMianVal->contentBasic, true);
             $propMianNew[$propMianVal->propId]['contentOther'] = json_decode($propMianVal->contentOther, true);
         }
         $proList = Bll_Broker_ShowcaseAdSetPro::getInstance()->initComboZfProData($proInfos, $propMianNew, $comboList);
     } else {
         $fixedProInfos = Bll_House_FixedPro::getInstance()->getBrokerHzFiexdProInfo($hzBrokerId);
         if (!empty($fixedProInfos)) {
             $proIds = Bll_Broker_ShowcaseOrders::getInstance()->getObjFieldInfo($fixedProInfos, 'proid');
             $proInfos_tmp = Bll_House_HzPro::getInstance()->getBrokerHzProInfo($proIds, $cityid);
             $proIdsc = Bll_Broker_ShowcaseOrders::getInstance()->getObjFieldInfo($proInfos_tmp, 'proid');
             $proInfosc = Bll_House_HzPro::getInstance()->getBrokerHzProInfo($proIdsc, $cityid);
             if (!empty($proInfosc)) {
                 if (count($proInfosc) >= Const_ShowcaseOrders::RENT_PRO_MAX_COUNT) {
                     $fixedProInfosCnt = Const_ShowcaseOrders::RENT_PRO_MAX_COUNT;
                 } else {
                     $fixedProInfosCnt = count($proInfosc);
                 }
             } else {
                 $fixedProInfosCnt = 0;
             }
         } else {
             $fixedProInfosCnt = 0;
         }
         $proInfo = Bll_Broker_ShowcaseAdSetPro::getInstance()->getBrokerAdRentPropInfo($intBrokerID);
         $proIds = Bll_Broker_ShowcaseOrders::getInstance()->getObjFieldInfo($proInfo, 'propId');
         $proStatus = Bll_House_FixedPro::getInstance()->getBrokerHzFiexdProStatus($proIds);
         $proInfos = Bll_House_HzPro::getInstance()->getBrokerHzProInfo($proIds, $cityid);
         $propMianInfo = Bll_House_HzPro::getInstance()->getHzProInfoByIds($proIds);
         $propMianNew = array();
         foreach ($propMianInfo as $propMianVal) {
             $propMianNew[$propMianVal->propId]['contentBasic'] = json_decode($propMianVal->contentBasic, true);
             $propMianNew[$propMianVal->propId]['contentOther'] = json_decode($propMianVal->contentOther, true);
         }
         $proList = Bll_Broker_ShowcaseAdSetPro::getInstance()->initZfProData($proInfos, $propMianNew, $proStatus);
     }
     if (count($proList) > $fixedProInfosCnt) {
         $fixedProInfosCnt = count($proList);
     }
     $objRequest->set_attribute('type', 'hz');
     $objRequest->set_attribute('index', 2);
     //精选推广开关
     $isChoice = Bll_City::isChoiceCity($cityid, Const_Site::HAOZU);
     $objRequest->set_attribute('isChoice', $isChoice);
     $objRequest->set_attribute('proList', $proList);
     $objRequest->set_attribute('fixedProInfosCnt', $fixedProInfosCnt);
     $objRequest->set_attribute('order_status', $order_status);
     $objRequest->set_attribute('todayPrice', $todayPrice);
     return 'Showcase_ZfManage';
 }
Ejemplo n.º 7
0
 /**
  * 判断房源推广状态
  * @param $cityId
  * @param $brokerId
  * @param $houseIds
  * @return array
  * add by xiongjianxu
  */
 public static function getHouseOnLineInfo($cityId, $brokerId, $houseIds)
 {
     $result = array();
     if (empty($cityId) || empty($brokerId) || empty($houseIds)) {
         return $result;
     }
     if (!is_array($houseIds)) {
         $houseIds = array($houseIds);
     }
     //是否为新端口城市
     $comboInfo = Bll_Combo_HouseRelation::isComboCity($cityId);
     if ($comboInfo['code'] == 200) {
         if ($comboInfo['data'] == 0) {
             //ppc城市
             //定价推广确认
             $bllProperty = new BLL_Property_Property();
             // 定价房源的数据
             $staticPro = $bllProperty->getSaleStaticProInfoByProId($cityId, $houseIds, $brokerId);
             foreach ($staticPro as $key => $value) {
                 $result[$key] = true;
                 //$key为houseId
             }
         } else {
             //新端口城市
             $houseComboArr = Bll_Combo_HouseRelation::getHouseRelation($brokerId, $cityId, $houseIds, Bll_Combo_HouseRelation::SITE_TYPE_AJK);
             foreach ($houseComboArr as $value) {
                 if ($value['state'] < Model_Combo_HouseRelation::ENUM_COMBO_OFFLINE) {
                     $result[$value['houseId']] = true;
                 } else {
                     $result[$value['houseId']] = false;
                 }
             }
         }
     }
     return $result;
 }
Ejemplo n.º 8
0
 /**
  * 判断是否是套餐城市
  */
 public static function ifComboCity($cityId)
 {
     $result = false;
     $comboInfo = Bll_Combo_HouseRelation::isComboCity($cityId);
     if ($comboInfo['code'] == 200 && $comboInfo['data'] == 1) {
         // 套餐城市
         $result = true;
     }
     return $result;
 }
Ejemplo n.º 9
0
 public function handle_request_internal()
 {
     if (!Bll_City::isShowCaseCity(static::$intBrokerCityID)) {
         $this->redirect('/user/combo/brokerhome');
         exit;
     }
     $objRequest = APF::get_instance()->get_request();
     $cityID = self::$BrokerInfo['BaseInfo']['CITYID'];
     $objRequest->set_attribute('PayType', self::$BrokerInfo['BaseInfo']['PAYTYPE']);
     $tmp = array('cityId' => $cityID, 'status' => 1, 'startDate' => date('Ymd'));
     $cityPrice = Bll_Broker_ConfigCityPrice::getInstance()->getCityPrice($tmp, Const_ShowcaseOrders::SALE_DB);
     $todayPrice = round($cityPrice->discountPrice / 100, 2);
     $intBrokerID = $objRequest->getBrokerId();
     $userId = $objRequest->getUserId();
     $data = array('brokerId' => $intBrokerID);
     $orderinfo = Bll_Broker_ShowcaseOrders::getInstance()->getBrokerOrders($data, $this->db);
     if (!$orderinfo) {
         $this->toManage('/ajkbroker/showcase/esf/');
     }
     $lavedays = ceil((strtotime($orderinfo->endDate) - strtotime(date('Ymd'))) / 3600 / 24);
     if ($orderinfo->isStop == 1 || $lavedays < 0) {
         $order_status = 'stop';
     } else {
         $objRequest->set_attribute('lavedays', $lavedays);
         $objRequest->set_attribute('lastday', date('Y-m-d', strtotime($orderinfo->endDate)));
         $order_status = 'open';
     }
     $objRequest->set_attribute('order_status', $order_status);
     $objRequest->set_attribute('todayPrice', $todayPrice);
     $params = APF::get_instance()->get_request()->get_parameters();
     $days = intval($params['days']);
     //status=2是停止,status=1是续费
     if ($params['status'] == 2) {
         if ($orderinfo->isStop == 0) {
             $stopstatus = Bll_Broker_ShowcaseOrders::getInstance()->stopBrokerOthers($orderinfo, $cityPrice->discountPrice, $this->db);
             if ($stopstatus['status']) {
                 $this->toManage();
             } else {
                 $this->toError($stopstatus['msg']);
             }
         } else {
             $msg = '订单类型不能操作';
             $this->toError($msg);
         }
     } elseif ($params['status'] == 1 && $days >= 1) {
         $BrokerMoney = Bll_Broker_ShowcaseOrders::getInstance()->getBrokerMoney($userId);
         if ($BrokerMoney < $todayPrice) {
             $this->toError(Const_ShowcaseOrders::MONEY_NOT_ENOUGH);
         }
         $Continueorder = Bll_Broker_ShowcaseOrders::getInstance()->continueBrokerOthers($orderinfo, $days, $cityPrice->discountPrice, $this->db);
         if ($Continueorder['status']) {
             $this->toManage();
         } else {
             $this->toError($Continueorder['msg']);
         }
     } elseif ($params['status'] == 3) {
         $proIds = array();
         if (!empty($params['rooms'])) {
             $proIds = explode(';', $params['rooms']);
             $filterProIds = Bll_Broker_ShowcaseAdSetPro::getInstance()->filterProIds($intBrokerID, $cityID, $this->db, $proIds);
             //有些房源不在线上展示
             if (count($filterProIds) != count($proIds)) {
                 $this->toError('有些房源没在线上推广,操作失败!');
             }
             $res = Bll_Broker_ShowcaseAdSetPro::getInstance()->insertAdProsInfo($intBrokerID, $cityID, $proIds, $this->db);
             if (!$res['status']) {
                 $this->toError($res['msg']);
             } else {
                 //插入成功,跳转至管理页面
                 if ($orderinfo->isStop == 0) {
                     $log = array();
                     $log['brokerId'] = $orderinfo->brokerId;
                     $log['cityId'] = $orderinfo->cityId;
                     $log['endDate'] = $orderinfo->endDate;
                     $log['startDate'] = $orderinfo->startDate;
                     $log['opType'] = Const_ShowcaseOrders::OPTYPE_6;
                     $log['totalDays'] = ceil((strtotime($orderinfo->endDate) - strtotime($orderinfo->startDate)) / 3600 / 24) + 1;
                     $log['createTime'] = time();
                     Bll_Broker_ShowcaseOrders::getInstance()->insertSetLog($log, $this->db);
                 }
                 $this->toManage();
             }
         }
     }
     $orderCreated = date('Ymd', $orderinfo->createTime);
     if ($orderCreated < date('Ymd')) {
         $click = Bll_Broker_ShowcaseOrders::getInstance()->getBrokerClick($intBrokerID, date('Ymd', strtotime('-1 days')), $this->db);
         if (!$click->quantityCount) {
             $objRequest->set_attribute('YClick', 0);
         } else {
             $objRequest->set_attribute('YClick', $click->quantityCount);
         }
         $objRequest->set_attribute('IS_YClick', true);
     }
     $isCombo = Bll_Combo_HouseRelation::isComboCity($cityID);
     if ($isCombo['data']) {
         $comboList = Bll_Combo_HouseRelation::getHouseRelations($intBrokerID, Bll_Combo_HouseRelation::SITE_TYPE_AJK, 1);
         if (!empty($comboList)) {
             if (count($comboList) >= Const_ShowcaseOrders::SALE_PRO_MAX_COUNT) {
                 $fixedProInfosCnt = Const_ShowcaseOrders::SALE_PRO_MAX_COUNT;
             } else {
                 $fixedProInfosCnt = count($comboList);
             }
         } else {
             $fixedProInfosCnt = 0;
         }
         $proInfo = Bll_Broker_ShowcaseAdSetPro::getInstance()->getBrokerAdSalePropInfo($intBrokerID);
         $proIds = Bll_Broker_ShowcaseOrders::getInstance()->getObjFieldInfo($proInfo, 'propId');
         $proInfos = Bll_House_EsfHouse::getHouseInfo($proIds, $cityID);
         $proList = Bll_Broker_ShowcaseAdSetPro::getInstance()->initComboEsfProData($proInfos, $comboList);
     } else {
         //获取经纪人计划
         $brokerPlanInfo = BLL_Plan_EsfPropFixedPlanRelation::get_instance()->getBrokerEsfOnlinePlan($intBrokerID);
         if (!empty($brokerPlanInfo)) {
             //计划数据不为空
             //计划IDs
             $planIds = Bll_Broker_ShowcaseOrders::getInstance()->getObjFieldInfo($brokerPlanInfo, 'id');
             //定价推广房源
             $fixedProInfos = Bll_Fixedspread_AjkFixedSpread::getFixedOnlineProByPlanIds($cityID, $planIds);
             $proIdsc = Bll_Broker_ShowcaseOrders::getInstance()->getObjFieldInfo($fixedProInfos, 'proId');
             $proInfosc = Bll_House_EsfHouse::getHouseInfo($proIdsc, $cityID);
             if (!empty($proInfosc)) {
                 if (count($proInfosc) >= Const_ShowcaseOrders::SALE_PRO_MAX_COUNT) {
                     $fixedProInfosCnt = Const_ShowcaseOrders::SALE_PRO_MAX_COUNT;
                 } else {
                     $fixedProInfosCnt = count($proInfosc);
                 }
             } else {
                 $fixedProInfosCnt = 0;
             }
         } else {
             $fixedProInfosCnt = 0;
         }
         $proInfo = Bll_Broker_ShowcaseAdSetPro::getInstance()->getBrokerAdSalePropInfo($intBrokerID);
         $proIds = Bll_Broker_ShowcaseOrders::getInstance()->getObjFieldInfo($proInfo, 'propId');
         $proInfos = Bll_House_EsfHouse::getHouseInfo($proIds, $cityID);
         $proStatus = Bll_Fixedspread_AjkFixedSpread::getFixedProBy($cityID, $proIds);
         $proList = Bll_Broker_ShowcaseAdSetPro::getInstance()->initEsfProData($proInfos, $proStatus, $planIds);
     }
     if (count($proList) > $fixedProInfosCnt) {
         $fixedProInfosCnt = count($proList);
     }
     $objRequest->set_attribute('type', 'ajk');
     $objRequest->set_attribute('index', 2);
     //精选推广开关
     $isChoice = Bll_City::isChoiceCity($cityID);
     $objRequest->set_attribute('isChoice', $isChoice);
     $objRequest->set_attribute('fixedProInfosCnt', $fixedProInfosCnt);
     $objRequest->set_attribute('proList', $proList);
     return 'Showcase_EsfManage';
 }