public function handle_request_internal()
 {
     if (Bll_City::isNewCommunityApplyCity(static::$intBrokerCityID)) {
         $this->redirect('/ajkbroker/broker/gardener2/?from=old_request');
     }
     $params = $this->getParameters();
     $page = isset($params['p']) ? max(1, $params['p']) : 1;
     $applyCount = Bll_Community_CommunityGardener::getBrokerApplyCount(static::$intBrokerID);
     /** 如果没有申请记录则直接返回 */
     if ($applyCount == 0) {
         $this->setAttribute('applyCount', 0);
         $this->setAttribute('multipageShow', false);
         //是否显示分页
         $this->setAttribute('applyInfos', array());
         $this->setAttribute('commInfos', array());
         return 'Broker_CommunityNewGardeners';
     }
     if ($applyCount <= self::PAGE_SIZE) {
         $page = 1;
     }
     /** 如果当前页面大于最大页面则直接跳转到第一页去 */
     if ($page > ceil($applyCount / self::PAGE_SIZE)) {
         $this->redirect($this->getURLPrefix());
     }
     $applyHistory = Bll_Community_CommunityGardener::getBrokerApplyHistory(static::$intBrokerID, $page, self::PAGE_SIZE);
     $failApplyIds = $this->initializationCommunityApplyInfo($applyHistory);
     $applyFailReason = Bll_Community_CommunityGardener::getApplyFailReasonEx($failApplyIds);
     $communityIds = $this->getCommunityIdFromApplyInfo($applyHistory);
     $communityInfo = Bll_Community_CommunityGardener::getMultiCommunityInfoByCommunityId($communityIds, array('commId', 'commName'));
     $multiPageShow = false;
     if ($applyCount > self::PAGE_SIZE) {
         $multiPage = $this->getMultiPage(array('p' => $page), $applyCount, self::PAGE_COUNT, self::PAGE_SIZE);
         $multiPageShow = true;
         $this->setAttribute("multipage", $multiPage);
     }
     $this->setAttribute('applyCount', $applyCount);
     $this->setAttribute('multipageShow', $multiPageShow);
     $this->setAttribute('applyInfos', $applyHistory);
     $this->setAttribute('applyFailReason', $applyFailReason);
     $this->setAttribute('commInfos', $communityInfo);
     return 'Broker_CommunityNewGardeners';
 }