Ejemplo n.º 1
0
 /**
  * 获取二手房竞价计划点击量
  *
  * @param $params
  * @return array
  */
 private function do_esf_click($params)
 {
     $params['houseid'] = trim($params['houseid'], ',');
     if (empty($params['houseid'])) {
         return array();
     }
     /**
      * @var $request AJKRequest
      */
     $request = APF::get_instance()->get_request();
     $cityId = $request->getBrokerCityId();
     $houseId = explode(',', $params['houseid']);
     if (empty($houseId[count($houseId) - 1])) {
         unset($houseId[count($houseId) - 1]);
     }
     if ($houseId) {
         $result = Model_Plan_HpProStatsDay::data_access($cityId)->filter_by_op('proId', 'in', $houseId)->filter_by_op('datei', '=', date('Ymd'))->find();
     } else {
         $result = array();
     }
     $rstArr = array();
     foreach ($result as $k => $v) {
         $base = isset($rstArr[$v->proId]) ? $rstArr[$v->proId] : 0;
         $rstArr[$v->proId] = $base + $v->cnum;
     }
     return $rstArr;
 }
Ejemplo n.º 2
0
 /**
  * 获取经纪人竞价推广某天的点击和花费信息
  *
  *
  *
  * @param $brokerId
  * @param $cityId
  * @param $datei
  * @return array
  */
 public static function getBrokerClickAndCostDay($brokerId, $cityId, $datei)
 {
     return Model_Plan_HpProStatsDay::data_access($cityId)->filter_by_op('brokerId', '=', $brokerId)->filter_by_op('datei', '=', $datei)->find();
 }