ajaxReturn(array("ResultCode"=>0,"ResultMessage"=>"缺少必要的参数","Data"=>"null")); } $signData = array($startTime,$endTime,$page,$pageSize,$userAccount); $signData=array_change_key_case($signData,CASE_LOWER ); ksort($signData); $md5_sign = md5(http_build_query($signData)); if($md5Sign != $md5_sign){ return $this->ajaxReturn(array("ResultCode"=>0,"ResultMessage"=>"验签失败","Data"=>"null")); } } /** * 注册明细 * @param */ public function registerDetail(){ $startTime = $_REQUEST['start_time']; $endTime = $_REQUEST['end_time']; $page = $_REQUEST['page']; $pageSize = $_REQUEST['page_size']; //时间区间 if(isset($startTime)&&isset($endTime)){ $where['register_time'] = array('between',[$startTime,$endTime]); }elseif(isset($startTime)){ $where['register_time'] = array('egt',$startTime); }elseif(isset($endTime)){ $where['register_time'] = array('elt',$startTime); } // 第几页数据 $page = intval($page); $page = $page ? $page : 1; //默认显示第一页数据 // 一页显示数据的条数 $pageSize = intval($pageSize); $row = $pageSize ? $pageSize : 10; // 默认排序:id降序 $order = 'id desc'; $data = M('user','tab_') ->field('id,account,promote_account,register_ip,register_time,device_number') ->where($where) ->order($order) ->page($page, $row) ->select(); if($data){ $result = [ 'ResultCode' => 1, 'ResultMessage' => "调用成功", 'Data' => $data ]; }else{ $result = [ 'ResultCode' => 1, 'ResultMessage' => "没有数据,换换条件吧", 'Data' => 'null' ]; } return $this->ajaxReturn($result); } /** * 支付明细 * @param */ public function payDetail(){ $startTime = $_REQUEST['start_time']; $endTime = $_REQUEST['end_time']; $page = $_REQUEST['page']; $pageSize = $_REQUEST['page_size']; //时间区间 if(isset($startTime)&&isset($endTime)){ $where['pay_time'] = array('between',[$startTime,$endTime]); }elseif(isset($startTime)){ $where['pay_time'] = array('egt',$startTime); }elseif(isset($endTime)){ $where['pay_time'] = array('elt',$startTime); } // 第几页数据 $page = intval($page); $page = $page ? $page : 1; //默认显示第一页数据 // 一页显示数据的条数 $pageSize = intval($pageSize); $row = $pageSize ? $pageSize : 10; // 默认排序:id降序 $order = 'id desc'; $data = M('spend','tab_') ->field('pay_order_number,promote_account,user_id,game_name,game_player_name,server_name,pay_time,cost,user_account') ->where($where) ->order($order) ->page($page, $row) ->select(); if($data){ $result = [ 'ResultCode' => 1, 'ResultMessage' => "调用成功", 'Data' => $data ]; }else{ $result = [ 'ResultCode' => 1, 'ResultMessage' => "没有数据,换换条件吧", 'Data' => 'null' ]; } return $this->ajaxReturn($result); } /** * 玩家角色信息 * @param */ public function roleInfo(){ $startTime = $_REQUEST['start_time']; $endTime = $_REQUEST['end_time']; $page = $_REQUEST['page']; $pageSize = $_REQUEST['page_size']; //时间区间 if(isset($startTime)&&isset($endTime)){ $where['play_time'] = array('between',[$startTime,$endTime]); }elseif(isset($startTime)){ $where['play_time'] = array('egt',$startTime); }elseif(isset($endTime)){ $where['play_time'] = array('elt',$startTime); } // 第几页数据 $page = intval($page); $page = $page ? $page : 1; //默认显示第一页数据 // 一页显示数据的条数 $pageSize = intval($pageSize); $row = $pageSize ? $pageSize : 10; // 默认排序:id降序 $order = 'id desc'; $data = M('user_play_info','tab_') ->field('promote_account,user_id,game_name,server_name,role_name,role_level,play_time,role_id,user_account') ->where($where) ->order($order) ->page($page, $row) ->select(); if($data){ $result = [ 'ResultCode' => 1, 'ResultMessage' => "调用成功", 'Data' => $data ]; }else{ $result = [ 'ResultCode' => 1, 'ResultMessage' => "没有数据,换换条件吧", 'Data' => 'null' ]; } return $this->ajaxReturn($result); } /** * 玩家登陆信息 * @param */ public function loginInfo(){ $startTime = $_REQUEST['start_time']; $endTime = $_REQUEST['end_time']; $page = $_REQUEST['page']; $pageSize = $_REQUEST['page_size']; //时间区间 if(isset($startTime)&&isset($endTime)){ $where['login_time'] = array('between',[$startTime,$endTime]); }elseif(isset($startTime)){ $where['login_time'] = array('egt',$startTime); }elseif(isset($endTime)){ $where['login_time'] = array('elt',$startTime); } // 第几页数据 $page = intval($page); $page = $page ? $page : 1; //默认显示第一页数据 // 一页显示数据的条数 $pageSize = intval($pageSize); $row = $pageSize ? $pageSize : 10; // 默认排序:id降序 $order = 'id desc'; $data = M('user_login_record','tab_') ->field('game_name,server_id,user_account,login_time,game_player_name') ->where($where) ->order($order) ->page($page, $row) ->select(); foreach ($data as $k=>$v){ $promoteId = $v['promote_id']; if($promoteId == 0){ $data[$k]['promote_account'] = '官方渠道'; }else{ $promote_account = M('promote','tab_') ->field('account') ->where('id',$promoteId) ->find(); $data[$k]['promote_account'] = $promote_account; } } if($data){ $result = [ 'ResultCode' => 1, 'ResultMessage' => "调用成功", 'Data' => $data ]; }else{ $result = [ 'ResultCode' => 1, 'ResultMessage' => "没有数据,换换条件吧", 'Data' => 'null' ]; } return $this->ajaxReturn($result); } }