public function handle_request() { if (empty($this->cityid)) { return; } $brokers = array(); $dao = Model_Plan_AjkPropspread::data_access(); if ($this->brokerid) { $dao->filter('brokerId', $this->brokerid); } $dao->filter('cityId', $this->cityid); $dao->filter('status', array(1, 11)); $datas = $dao->find(); foreach ($datas as $data) { if (isset($brokers[$data['brokerId']])) { continue; } $result = Uri_Curl::get($this->url . 'user/broker/transformmoney', array('id' => $data['brokerId'], 'status' => 5)); printf('[%s]开始处理二手房: 城市ID为%s的历史数据,brokerId为 %s,处理结果:%s' . PHP_EOL, date('Y-m-d H:i:s'), $data['cityId'], $data['brokerId'], $result); $brokers[$data['brokerId']] = 1; } }
/** *获取房源计划信息以便判断是否竞价是否定价 */ public static function getAjkPropSpreadByIds($propIds) { return Model_Plan_AjkPropspread::data_access()->force_master()->load_field('bidVersion')->load_field('status')->load_field('propId')->filter('propId', $propIds)->filter_by_op('status', '<>', 2)->sort('id', 'desc')->get_all(); }
/** * 根据板块、价格段查询坑里面的精选房源 * * @param $commId * @param $minPrice * @param $maxPrice * @return array */ public static function getPropQueueSpreadByBlockBucket($areacode, $minPrice, $maxPrice) { try { return Model_Plan_AjkPropspread::data_access()->filter('areacode', $areacode)->filter('status', Model_Plan_EsfAjkPropSpread::ONQUEUE)->filter('bidVersion', Model_Plan_EsfAjkPropSpread::CHOICEVERSION)->filter('smallprice', $minPrice)->filter('bigprice', $maxPrice)->filter('tradetype', 1)->filter('model', self::BLOCK_CHOICE)->sort('createtime', 'asc')->get_all(); } catch (Exception $e) { return array(); } }