コード例 #1
0
 /**
  * solar更新
  *
  * @param int $brokerId
  * @param int $planId
  * @param int $propId
  * @param int $cityId
  */
 private function insertLogRankPropUpdate($brokerId, $planId, $propId, $cityId)
 {
     $RankProperty = new DAO_RankProperty();
     if (!$RankProperty->insertLogRankPropUpdate($propId, $cityId, 1, 0, 1)) {
         printf("[%s] 计划id: %s 房源Id: %d 经纪人: %s 城市: %s 动作: 1 solar更新失败\n", date('Y-m-d H:i:s'), $planId, $propId, $brokerId, $cityId);
         return;
     }
     //输出 日志,这边可能会导致调度程序内存溢出
     printf("[%s] 计划id: %s 房源Id: %d 经纪人: %s 城市: %s 动作: 1 solar更新成功\n", date('Y-m-d H:i:s'), $planId, $propId, $brokerId, $cityId);
 }
コード例 #2
0
ファイル: PropSpread.php プロジェクト: emilymwang8/ajk-broker
 public function getRentQuality($propId = 0, $cityId = 0, $arrPropInfo = array())
 {
     if (empty($arrPropInfo)) {
         $prop = $this->getPropInfoBll($propId, $cityId);
     } else {
         $prop = $arrPropInfo;
     }
     apf_require_class("DAO_RankProperty");
     $daoRankProperty = new DAO_RankProperty();
     if ($cityId == 11) {
         $pdo_name = 'prop_shanghai_slave';
     } elseif ($cityId == 14) {
         $pdo_name = 'prop_beijing_slave';
     } elseif ($cityId > 41) {
         $pdo_name = 'prop_other_04_slave';
     } else {
         $pdo_name = 'prop_other_slave';
     }
     $dw_stats = APF_DB_Factory::get_instance()->get_pdo('dw_stats');
     if ($prop['POSTDATE'] > strtotime(date("Ymd"))) {
         $pdo = APF_DB_Factory::get_instance()->get_pdo($pdo_name);
         return $daoRankProperty->calcRentalPropertyRankScoreV2($pdo, $dw_stats, $propId);
     } else {
         $rankScroe = $daoRankProperty->getRentalPropertyRankScore($dw_stats, $propId);
         if (isset($rankScroe['score'])) {
             return $rankScroe['score'];
         } else {
             $pdo = APF_DB_Factory::get_instance()->get_pdo($pdo_name);
             return $daoRankProperty->calcRentalPropertyRankScoreV2($pdo, $dw_stats, $propId);
         }
     }
 }