diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index 3a754e5a0..5720a6f55 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -11,25 +11,25 @@ class BehaviorLogController extends ThinkController $map = []; if (isset($params['user_account'])) { - $map['tab_pay_info.user_account'] = $params['user_account']; + $map['user_account'] = $params['user_account']; } if (isset($params['extend'])) { - $map['tab_pay_info.extend'] = $params['extend']; + $map['_string'] = 'extend = "'.$params["extend"]. '" or order_id = "'.$params["extend"] . '"'; } if (isset($params['game_name'])) { $game_id = ['in', array_column(getGameByName($params['game_name'], $params['sdk_version']), 'id')]; - $map['tab_pay_info.game_id'] = $game_id; + $map['game_id'] = $game_id; } if (isset($params['server_name'])) { $game_id = M('game', 'tab_')->where(['relation_game_name' => $params['game_name'],'sdk_version' => $params['sdk_version']])->getField('id'); $server_id = M('server', 'tab_')->where(['server_name' => $params['server_name'], 'game_id' => $game_id])->getField('server_num'); - $map['tab_pay_info.server_id'] = $server_id; + $map['server_id'] = $server_id; } if (isset($params['game_player_name'])) { - $map['tab_pay_info.game_player_name'] = $params['game_player_name']; + $map['game_player_name'] = $params['game_player_name']; } if (isset($params['game_player_id'])) { - $map['tab_pay_info.game_player_id'] = $params['game_player_id']; + $map['game_player_id'] = $params['game_player_id']; } @@ -40,7 +40,7 @@ class BehaviorLogController extends ThinkController $endDate = empty($params['timeend']) ? date('Y-m-d') : $params['timeend']; $startTime = strtotime($startDate); $endTime = strtotime($endDate) + 86399; - $map['tab_pay_info.create_time'] = array('BETWEEN', [$startTime, $endTime]); + $map['create_time'] = array('BETWEEN', [$startTime, $endTime]); if (isset($params['promote_id'])) { $promoteId = $params['promote_id']; if ($promoteId == 0) { @@ -52,13 +52,22 @@ class BehaviorLogController extends ThinkController $map['promote_id'] = ['in', $promoteIds]; } } - $data = M('pay_info', 'tab_')->field('tab_pay_info.id,tab_pay_info.user_account,extend,tab_pay_info.create_time,tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.promote_account,tab_pay_info.order_id,tab_pay_info.game_player_id,tab_pay_info.game_player_name,price,tab_server.server_name')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select(); + // $data = M('pay_info', 'tab_')->field('tab_pay_info.id,tab_pay_info.user_account,extend,tab_pay_info.create_time,tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.promote_account,tab_pay_info.order_id,tab_pay_info.game_player_id,tab_pay_info.game_player_name,price,tab_server.server_name')->join('LEFT JOIN tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id AND tab_pay_info.server_id <> 0')->where($map)->order('tab_pay_info.id DESC')->page($p, $row)->select(); + $data = M('pay_info', 'tab_')->where($map)->order('id DESC')->page($p, $row)->select(); foreach($data as $k => $v) { if(empty($v['extend'])) { $data[$k]['extend'] = $v['order_id']; } + if ($v['server_id'] > 0 && !empty($v['extend'])){ + $data[$k]['server_name'] = M('server', 'tab_')->where(['game_id' => $v['game_id'],'server_num' =>$v['server_id']])->getField('server_name'); + } else { + $data[$k]['server_name'] = ''; + $data[$k]['game_player_name'] = ''; + $data[$k]['game_player_id'] = ''; + + } } - $count = M('pay_info', 'tab_')->join('tab_server on tab_pay_info.server_id = tab_server.server_num AND tab_pay_info.game_id = tab_server.game_id')->where($map)->count(); + $count = M('pay_info', 'tab_')->where($map)->count(); $page = set_pagination($count, $row); if ($page) { $this->assign('_page', $page); diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index 5d4547d60..fe75474ee 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -865,12 +865,7 @@ class PromoteService { 'message' => '账号只能为数字,字母和下划线', ]; } - if ($mobile == '') { - return [ - 'status' => false, - 'message' => '请输入手机号', - ]; - } else { + if ($mobile != '') { if (!preg_match("/^1[3456789]{1}\d{9}$/", $mobile)) { return [ 'status' => false, @@ -878,12 +873,7 @@ class PromoteService { ]; } } - if ($idcard == '') { - return [ - 'status' => false, - 'message' => '请输入身份证号', - ]; - } else { + if ($idcard != '') { if (!IdCard::isIdcard($idcard)) { return [ 'status' => false, @@ -891,12 +881,7 @@ class PromoteService { ]; } } - if ($realName == '') { - return [ - 'status' => false, - 'message' => '请输入姓名', - ]; - } else { + if ($realName != '') { if (mb_strlen($realName) < 2 || mb_strlen($realName) > 4) { return [ 'status' => false, diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 1f632a097..367ffbac5 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1909,16 +1909,26 @@ class DownloadController extends BaseController { foreach($data as $key => $v) { $v['create_time'] = date('Y-m-d H:i:s',$v['create_time']); $promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find(); - $serverId = $v['server_id']; - $gameId = $v['game_id']; - $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find(); + if($v['server_id'] != 0 && !empty($v['extend'])) { + $serverId1 = $v['server_id']; + $gameId = $v['game_id']; + $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId1,'game_id'=>$gameId])->find(); + $servername = $serverInfo['server_name']; + }else { + $servername = ""; + $v['game_player_id'] = ""; + $v['game_player_name'] = ""; + } $v['promote_id']= $promoteInfo['account']; + if(empty($v['extend'])) { + $v['extend'] = $v['order_id']; + } $csvData['extend'] = $this->encryption($v['extend']); $csvData['create_time'] = $v['create_time']; $csvData['user_account'] = $v['user_account']; $csvData['game_name'] = $v['game_name']; $csvData['promote_id'] = $v['promote_id']; - $csvData['server_name'] = $serverInfo['server_name']; + $csvData['server_name'] = $servername; $csvData['user_id'] = $v['game_player_id']; $csvData['game_player_name'] = $v['game_player_name']; $csvData['price'] = $v['price']; @@ -3446,7 +3456,7 @@ class DownloadController extends BaseController { ->where($map) ->order('tab_spend.id desc') ->find()['income']; - $csvData1["user_account"] = "合计"; + $csvData1["user_account"] = "合计(此数据根据充值状态进行统计)"; $csvData1["pay_order_number"] = "--"; $csvData1["pay_amount"] = $income; $csvData1["pay_way"] = "--"; diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php index 53af22fda..3cf12243a 100644 --- a/Application/Home/Controller/PlayersController.class.php +++ b/Application/Home/Controller/PlayersController.class.php @@ -74,15 +74,26 @@ class PlayersController extends BaseController { $rs = M('pay_info','tab_')->where($map)->order('tab_pay_info.create_time desc') ->page($page, $row)->select(); foreach($rs as $key => $v) { - $rs[$key]['extend'] = encryption($v['extend']); - $rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); - $promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find(); - $serverId1 = $v['server_id']; - $gameId = $v['game_id']; - $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId1,'game_id'=>$gameId])->find(); - $rs[$key]['server_name'] = $serverInfo['server_name']; - $rs[$key]['promote_id']= $promoteInfo['account']; - } + if($v['server_id'] != 0 && !empty($v['extend'])) { + $serverId1 = $v['server_id']; + $gameId = $v['game_id']; + $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId1,'game_id'=>$gameId])->find(); + $rs[$key]['server_name'] = $serverInfo['server_name']; + }else { + $rs[$key]['server_name'] = ""; + $rs[$key]['game_player_id'] = ""; + $rs[$key]['game_player_name'] = ""; + } + if(empty($v['extend'])) { + $v['extend'] = $v['order_id']; + } + $rs[$key]['extend'] = encryption($v['extend']); + $rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); + $promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find(); + + $rs[$key]['promote_id']= $promoteInfo['account']; + + } $count = M('pay_info', 'tab_') ->field('tab_pay_info.id') ->where($map) diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 2af087aae..36edd4cc4 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -1893,13 +1893,15 @@ class PromoteController extends BaseController public function shift() { - $this->ajaxReturn([ - 'status' => false, - 'msg'=>'该功能暂时关闭' - ]); - $loginPromote = $this->getLoginPromote(); $params = $_POST; + if (isset($params['type']) && $params['type'] == 2) { + $this->ajaxReturn([ + 'status' => false, + 'msg'=>'该功能暂时关闭' + ]); + } + $params['creator_id'] = $loginPromote['id']; $params['creator_type'] = 1; $promoteService = new PromoteService(); diff --git a/Application/Home/View/default/Promote/addPromote.html b/Application/Home/View/default/Promote/addPromote.html index e718cc779..b80c232fe 100644 --- a/Application/Home/View/default/Promote/addPromote.html +++ b/Application/Home/View/default/Promote/addPromote.html @@ -36,19 +36,19 @@