Beispiel #1
0
 /**
  * 获取 坑位平均点击和预算
  *
  * @param $blockId
  * @param $cityId
  * @param $price
  * @return array
  */
 public static function getBucketAverageClickBudget($blockId, $cityId, $price)
 {
     $priceIntervalInfo = self::getPriceIntervalInfo($cityId, $price);
     if (empty($priceIntervalInfo)) {
         return array();
     }
     $tablePostfix = Model_Config_huTablesUploadStatus::getHzAverageClickBudgetTable();
     $averageClickAndBudget = Model_Stats_HzAverageClickBudget::getAverageClickBudget($tablePostfix, $blockId, $priceIntervalInfo['id']);
     return $averageClickAndBudget;
 }
 /**
  * 获取坑位的平均点击的预算
  *
  * @param $postfix
  * @param $blockId
  * @param $priceId
  * @return array
  */
 public static function getAverageClickBudget($postfix, $blockId, $priceId)
 {
     try {
         $averageClickAndBucket = Model_Stats_HzAverageClickBudget::data_access($postfix)->filter('blockId', ltrim($blockId, 0))->filter('priceId', $priceId)->sort('id')->get_row();
     } catch (Exception $e) {
         return array();
     }
     if (is_null($averageClickAndBucket)) {
         return array();
     }
     return $averageClickAndBucket;
 }