Beispiel #1
0
 /**
  * 首页游戏广告流程统计图
  */
 public function graphgameadAction()
 {
     $date = reqstr('date') ? date('Y_m_d', strtotime(reqstr('date'))) : date('Y_m_d', strtotime('-1 day'));
     $stationid = reqstr('stationid', 1);
     $nt = new Psys_StationModel();
     $seleced = "appid,sindexnum,detailnum,downnum";
     $data_an = $nt->GetList(array('date' => $date, 'stationid' => $stationid, 'sys' => 'android'), 'sindexnum desc', $page, $pagesize, $seleced, 'rha_game_ads_process');
     $data_ios = $nt->GetList(array('date' => $date, 'stationid' => $stationid, 'sys' => 'ios'), 'sindexnum desc', $page, $pagesize, $seleced, 'rha_game_ads_process');
     /*var_dump($data);
     		exit;*/
     if ($data_an['allnum'] <= 0 && $data_ios['allnum']) {
         return 0;
     }
     $result['x_cat'] = array('首页点击数量', '进入详情页数量', '下载数量');
     $i = 0;
     foreach ($data_an['allrow'] as $k => $v) {
         //$result['x_cat'][$i] = $v['ad_name'];
         //拼接分类
         $datas_an[$i]['name'] = $nt->GetAppName($v['appid']);
         $datas_an[$i]['data'][] = (int) $v['sindexnum'];
         $datas_an[$i]['data'][] = (int) $v['detailnum'];
         $datas_an[$i]['data'][] = (int) $v['downnum'];
         $i++;
     }
     $j = 0;
     foreach ($data_ios['allrow'] as $k => $v) {
         //$result['x_cat'][$j] = $v['ad_name'];
         //拼接分类
         $datas_ios[$j]['name'] = $nt->GetAppName($v['appid']);
         $datas_ios[$j]['data'][] = (int) $v['sindexnum'];
         $datas_ios[$j]['data'][] = (int) $v['detailnum'];
         $datas_ios[$j]['data'][] = (int) $v['downnum'];
         $j++;
     }
     $result['android']['y_data'] = $datas_an;
     $result['ios']['y_data'] = $datas_ios;
     return $result;
 }
 public function gonetalarmlistAction()
 {
     $page = reqnum('page', 1);
     $pagesize = 10;
     $m = new Psys_StationModel();
     $data = $m->GetList(array('is_delete' => 0), 'stationid asc', $page, $pagesize, "*", 'rha_gonet_trigger');
     $stations = $m->station();
     if ($data['allnum']) {
         $data['paging'] = $this->paging($data['allnum'], $page, $pagesize, count($data['allrow']));
         foreach ($data['allrow'] as &$v) {
             $v['stationid'] = $this->getstationname($stations, $v['stationid']);
             if ($v['type'] == 2) {
                 $v['type'] = '一键上网成功次数不足触发';
             } elseif ($v['type'] == 1) {
                 $v['type'] = '一键上网失败次数过多触发';
             }
             $v['stime'] = $v['stime'] . '点';
             $v['etime'] = $v['etime'] . '点';
         }
     } else {
         $data['paging'] = '';
     }
     return $data;
 }