/**
  * 获取平均预算和点击
  *
  * @param $communityId
  * @param $cityId
  * @param $price
  * @return array|bool
  */
 public static function getBucketAverageClickBudget($blockId, $newBlockId, $houseType, $priceId)
 {
     $validDate = Model_Config_huTablesUploadStatus::getDate('s_bid_average_click_budget_jp');
     if (empty($validDate)) {
         $validDate = date("Y-m-d");
     }
     return Model_Stats_JpAverageClickBudget::getAverageClickBudget($blockId, $newBlockId, $houseType, $priceId, date("Ymd", strtotime($validDate)));
 }
 /**
  * 获取坑位的平均点击的预算
  *
  * @param $blockId
  * @param $priceId
  * @return array
  */
 public static function getAverageClickBudget($blockId, $newBlockId, $houseType, $priceId, $date)
 {
     try {
         $month = date('m', strtotime($date));
         $averageClickAndBucket = Model_Stats_JpAverageClickBudget::data_access($month)->filter('blockId', $blockId)->filter('newBlockId', $newBlockId)->filter('houseType', $houseType)->filter('priceId', $priceId)->get_row();
     } catch (Exception $e) {
         return array('averageClick' => 0, 'averageBudget' => 0);
     }
     if (is_null($averageClickAndBucket)) {
         return array('averageClick' => 0, 'averageBudget' => 0);
     }
     return $averageClickAndBucket;
 }