Exemple #1
0
 /**
  * 获取经纪人有效的竞价计划
  *
  * @param int $brokerId
  * @param int $cityId
  * @param bool $isChoiceCity
  * @return array
  */
 public static function getBrokerValidPlanList($brokerId, $cityId, $isChoiceCity)
 {
     return Model_Plan_EsfAjkPropSpread::getValidPlan($brokerId, $cityId, $isChoiceCity);
 }
 /**
  *
  * 获取经纪人的竞价房源数
  *
  * @param $brokerId
  * @param $cityId
  * @param $siteType
  * @return int
  */
 public static function getBrokerBidNum($brokerId, $cityId, $siteType)
 {
     $num = 0;
     switch ($siteType) {
         case 'ajk':
             $bidList = Model_Plan_EsfAjkPropSpread::getValidPlan($brokerId, $cityId, true);
             foreach ($bidList as $bid) {
                 if ($bid['status'] == 1) {
                     $num += 1;
                 }
             }
             break;
         case 'hz':
             $brokerMapping = Bll_Broker_MainBusiness::getDataByEsfId($brokerId);
             //根据
             $bidList = Model_Plan_HzPlanBasic::get_online_bid_plan_ex($brokerId, 2);
             $num = count($bidList);
             break;
         case 'jp':
             $brokerMapping = Bll_Broker_MainBusiness::getDataByEsfId($brokerId);
             //根据经纪人查询商铺相应
             $bidList = Model_Plan_Jp::getPlanByMemberId($brokerMapping['jpBrokerid'], 2, array(2));
             $num = count($bidList);
             break;
         default:
             break;
     }
     return $num;
 }