/** * 获取周边板块公共委托房源列表 * @param int $areaTypeId,$dateLine,$currentPage * @return array * */ public static function getAreaPublicCommissionList($areaTypeId, $dateLine) { //获取对当天有效的memcache $time = Util_MemCacheTime::getPublicCommissionByAreacode(); $memcache = APF_Cache_Factory::get_instance()->get_memcache(); $key = Util_MemCacheKey::getPublicCommissionByAreacode($areaTypeId, $dateLine); $value = $memcache->get($key); if (!$value) { $parentId = ltrim($areaTypeId, 0); //获取区域下符合条件的委托房源(发布于前天以前,当前被抢0、1次,列表显示逻辑与主营板块列表同) $arrParamCodes = self::getAreaCodesByParentId($parentId); $inparams = implode(',', array_fill(0, count($arrParamCodes), '?')); /* * jasonqian 2011-08-26 * propertystatus!=4 系统删除的房源不显示 */ if (!$inparams) { return array(); } $Conditions = " areacode in({$inparams}) and openStatus = ? and createtime > ? and createtime < ? and propertystatus in (1,3) and openBrokerCnt in(4,5) order by openBrokerCnt desc,createtime desc limit 60"; $Params = $arrParamCodes; $Params[] = 2; $Params[] = time() - 86400 * 30; $Params[] = $dateLine; //得到符合条件的委托房源(前天以前,目前被抢0、1次,在区域大范围内) $CommissionList = parent::getPublicCommissionList($Conditions, $Params, true); $value = $CommissionList; $memcache->set($key, $value, 0, $time); } return $value; }