From 6671565b5e04281b845c6522849eb7b6e128990b Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 26 Dec 2019 15:28:47 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/GameController.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 842b87773..f952c5d6b 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -298,7 +298,10 @@ class GameController extends ThinkController $this->error('一句话简介不能超过30个字!'); exit; } - if (!empty($_POST['beta_url']) && !preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) { + if ($_POST['beta_status'] == 1 && empty($_POST['beta_url'])) { + return $this->error("请在Beta按钮开启的情况填写Beta链接"); + } + if (!preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) { return $this->error("请填写正确的Beta链接"); } /*if($_POST['apply_status']==0&&$_POST['game_status']==1){ From 30922605e297e9a5db8841dc1718da6489bb990c Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 26 Dec 2019 15:32:02 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/GameController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index f952c5d6b..b71f7a1dd 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -301,7 +301,7 @@ class GameController extends ThinkController if ($_POST['beta_status'] == 1 && empty($_POST['beta_url'])) { return $this->error("请在Beta按钮开启的情况填写Beta链接"); } - if (!preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) { + if (!empty($_POST['beta_url']) && !preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) { return $this->error("请填写正确的Beta链接"); } /*if($_POST['apply_status']==0&&$_POST['game_status']==1){ From 669baefe5e758476e7494ca682070e08eb2be2b5 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Thu, 26 Dec 2019 15:52:49 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=B8=B8=E6=88=8F--=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=96=B9=E5=BC=8F=E6=B8=A0=E9=81=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/GameController.class.php | 4 +- Application/Admin/View/Game/add.html | 79 ++++++++++++----- Application/Admin/View/Game/edit.html | 87 +++++++++++++------ Data/update.sql | 6 +- 4 files changed, 124 insertions(+), 52 deletions(-) diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 0f5e8e217..cb0e10c8b 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -299,7 +299,7 @@ class GameController extends ThinkController exit; } if (!preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) { - return $this->error("请填写正确的Bata链接"); + // return $this->error("请填写正确的Bata链接"); } /*if($_POST['apply_status']==0&&$_POST['game_status']==1){ $this->error('游戏未审核不允许显示');//游戏添加完成 @@ -316,6 +316,7 @@ class GameController extends ThinkController $game = D(self::model_name);//M('$this->$model_name','tab_'); $_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount']; $_POST['detail_content'] = $content; + $_POST['pay_config'] = json_encode($_POST['pay_config']); $res = $game->update(); $id = $res["id"]; $sibling = D("Game")->find($id); @@ -371,6 +372,7 @@ class GameController extends ThinkController } else { $id || $this->error('id不能为空'); $data = D(self::model_name)->detailback($id); + $data['pay_config'] = json_decode($data['pay_config'],true); $data || $this->error('数据不存在!'); if (!empty($data['and_dow_address'])) { $data['and_dow_address'] = ltrim($data['and_dow_address'], '.'); diff --git a/Application/Admin/View/Game/add.html b/Application/Admin/View/Game/add.html index aa8132628..1fc3cd195 100644 --- a/Application/Admin/View/Game/add.html +++ b/Application/Admin/View/Game/add.html @@ -220,7 +220,7 @@ 游戏ICON - + -->
@@ -249,7 +249,7 @@ 游戏素材包 - +
上传素材包
@@ -259,7 +259,7 @@
-
+
此处可上传该游戏的素材包,必须为压缩包形式,用于渠道后台下载推广 @@ -267,7 +267,7 @@ 游戏推荐图 - + -->
@@ -296,7 +296,7 @@ 游戏截图 - @@ -407,18 +407,18 @@ - - 超级签Token: - - - - - - 超级签URL: - - - - + + 超级签Token: + + + + + + 超级签URL: + + + +
@@ -490,6 +490,39 @@ + + 支付宝 + + + + + + + + 微信 + + + + + + + + 快捷支付 + + + + + + 是否开启强更 @@ -612,7 +645,7 @@ 分享图标 - +
@@ -620,7 +653,7 @@
-
+
512*512px @@ -629,7 +662,7 @@ 分享背景图片 - +
@@ -637,7 +670,7 @@
-
+
720*1280px及以上 diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html index f3ff9f62d..ee6ae7add 100644 --- a/Application/Admin/View/Game/edit.html +++ b/Application/Admin/View/Game/edit.html @@ -226,17 +226,17 @@ 游戏ICON - +
-->
@@ -257,7 +257,7 @@ 游戏素材包 - +
上传素材包
@@ -276,21 +276,21 @@
-
+
此处可上传该游戏的素材包,必须为压缩包形式,用于渠道后台下载推广 游戏推荐图 - + @@ -308,7 +308,7 @@
-
+ 470*350px(用于官网首屏推荐游戏位展示) @@ -359,7 +359,7 @@ 落地页视频 - +
上传视频
@@ -379,7 +379,7 @@
-
+
视频大小不能超过20M,支持格式:mp4,3gp,wmv,asf,asx,mov,m4v,avi,flv,qlv @@ -554,18 +554,18 @@ - - 超级签Token: - - - - - - 超级签URL: - - - - + + 超级签Token: + + + + + + 超级签URL: + + + + 超级签状态: @@ -663,6 +663,39 @@ + + 支付宝 + + + + + + + + 微信 + + + + + + + + 快捷支付 + + + + + + 是否开启强更 @@ -786,7 +819,7 @@ 分享游戏图标 - +
@@ -794,7 +827,7 @@
-
+
512*512px @@ -806,7 +839,7 @@ 分享背景图片 - +
diff --git a/Data/update.sql b/Data/update.sql index e4ba848f4..24a99ce92 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -911,4 +911,8 @@ CREATE TABLE `tab_repair_pay` ( ALTER TABLE `tab_game` ADD COLUMN `beta_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Beta版状态'; ALTER TABLE `tab_game` -ADD COLUMN `beta_url` varchar(150) NOT NULL DEFAULT '' COMMENT 'Beta链接'; \ No newline at end of file +ADD COLUMN `beta_url` varchar(150) NOT NULL DEFAULT '' COMMENT 'Beta链接'; + +-- 游戏支付方式渠道配置 +ALTER TABLE `tab_game` +ADD COLUMN `pay_config` varchar(255) DEFAULT NULL COMMENT '支付渠道 wx 微信 zfb 支付宝 quick 快捷 (gf 官方 sq 双乾'; \ No newline at end of file From 1e9409ef1ab3f61f263fcb034de2c048396bd06c Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Thu, 26 Dec 2019 15:53:07 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BC=98=E5=8C=96-=E3=80=90=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E3=80=91-=E3=80=90=E5=B9=B3=E5=8F=B0=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E3=80=91-=E3=80=90=E6=B8=B8=E6=88=8F=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E3=80=91=E3=80=81=E3=80=90=E6=B8=B8=E6=88=8F=E5=85=85?= =?UTF-8?q?=E5=80=BC=E7=BB=9F=E8=AE=A1=E3=80=91=E3=80=81=E3=80=90=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E6=96=B9=E5=BC=8F=E7=BB=9F=E8=AE=A1=E3=80=91=E5=92=8C?= =?UTF-8?q?=E3=80=90=E5=85=85=E5=80=BC=E6=96=B9=E5=BC=8F=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E3=80=91=E7=9A=84=E4=BB=8A=E6=97=A5=E5=85=85=E5=80=BC=E3=80=81?= =?UTF-8?q?=E6=9C=AC=E5=91=A8=E5=85=85=E5=80=BC=E3=80=81=E6=9C=AC=E6=9C=88?= =?UTF-8?q?=E5=85=85=E5=80=BC=E4=B8=8D=E6=A0=B9=E6=8D=AE=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=94=B9=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 167 ++++++++++++------ .../Controller/PlatformController.class.php | 95 ++++++++-- .../RechargeSumController.class.php | 3 +- 3 files changed, 190 insertions(+), 75 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 8205764a9..c6d331b20 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2438,30 +2438,43 @@ class ExportController extends Controller $map['fgame_name'] =$_REQUEST['game_name']; unset($_REQUEST['fgame_name']); } - $today=total(1); - $week=total(2); - $mounth=total(3); + $today = total(1); + $week = total(2); + $mounth = total(3); //为数据权限添加 setPowerPromoteIds($map); - $data=$user - ->field('fgame_name,fgame_id,date_format(FROM_UNIXTIME( register_time),"%Y-%m-%d") AS time, count(id) as count, - count(IF(register_time '.$today.',1,null)) as today, - count(IF(register_time '.$week.',1,null)) as week, - count(IF(register_time '.$mounth.',1,null)) as mounth') + $data = $user + ->field('fgame_name,fgame_id,date_format(FROM_UNIXTIME( register_time),"%Y-%m-%d") AS time, count(id) as count') ->where($map) ->group('fgame_id') ->order('count desc,register_time') ->select(); - - $count=count($data); +// dd($data); + $map2 = array(); + $map['fgame_id'] = array('egt', 0); + $map['puid'] = 0; + setPowerPromoteIds($map2); + + $data2 = $user->field('fgame_id,count(IF(register_time ' . $today . ',1,null)) as today, + count(IF(register_time ' . $week . ',1,null)) as week, + count(IF(register_time ' . $mounth . ',1,null)) as mounth') + ->where($map2) + ->group('fgame_id') + ->select(); + $data2 = array_column($data2, null, 'fgame_id'); +// dd($data2); + $count = count($data); foreach ($data as $key => $value) { - static $i=0; + static $i = 0; $i++; - $data[$key]['rand']=$i; + $data[$key]['rand'] = $i; if ($data[$key]['fgame_id'] == 0) { $data[$key]['fgame_name'] = '其他注册'; } + $data[$key]['today'] = $data2[$value['fgame_id']]['today']; + $data[$key]['week'] = $data2[$value['fgame_id']]['week']; + $data[$key]['mounth'] = $data2[$value['fgame_id']]['mounth']; } $total=A('Platform')->data_total($data); if($_REQUEST['data_order']!=''){ @@ -2517,26 +2530,39 @@ class ExportController extends Controller $map['game_id'] =$_REQUEST['game_name']; unset($_REQUEST['game_name']); } - $map['pay_status']=1; - $today=total(1); - $week=total(2); - $mounth=total(3); - //为数据权限添加 - setPowerPromoteIds($map); - $data=$spend - ->field('game_name,game_id,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time, sum(pay_amount) as count, - sum(IF(pay_time '.$today.',pay_amount,0)) as today, - sum(IF(pay_time '.$week.',pay_amount,0)) as week, - sum(IF(pay_time '.$mounth.',pay_amount,0)) as mounth') + $map['pay_status'] = 1; + $today = total(1); + $week = total(2); + $mounth = total(3); + + + $data = $spend + ->field('game_name,game_id,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time, sum(pay_amount) as count') ->where($map) ->where($map) ->group('game_id') - ->order('count desc') + ->order('count desc,pay_time') ->select(); - $count=count($data); + //今日、本周、本月不随搜索条件而变动 + $map2['pay_status'] = 1; + $map2['game_id'] = array('gt', 0); + setPowerPromoteIds($map2); + $data2 = $spend + ->field('game_id,sum(IF(pay_time ' . $today . ',pay_amount,0)) as today, + sum(IF(pay_time ' . $week . ',pay_amount,0)) as week, + sum(IF(pay_time ' . $mounth . ',pay_amount,0)) as mounth') + ->where($map2) + ->group('game_id') + ->select(); + $data2 = array_column($data2, null, 'game_id'); + $count = count($data); foreach ($data as $key => $value) { - static $i=0; + static $i = 0; $i++; - $data[$key]['rand']=$i; + $data[$key]['rand'] = $i; + //加入今日、本周、本月数据 + $data[$key]['today'] = $data2[$value['game_id']]['today']; + $data[$key]['week'] = $data2[$value['game_id']]['week']; + $data[$key]['mounth'] = $data2[$value['game_id']]['mounth']; } $total=A('Platform')->data_total($data); $this->assign('total',$total); @@ -2583,7 +2609,8 @@ class ExportController extends Controller $page = $page ? $page : 1; //默认显示第一页数据 $arraypage=$page; $row = 10; - $user=M('User','tab_');$map['puid'] = 0; + $user=M('User','tab_'); + $map['puid'] = 0; if(isset($_REQUEST['timestart'])&&isset($_REQUEST['timeend'])){ $map['register_time'] =array('BETWEEN',array(strtotime($_REQUEST['timestart']),strtotime($_REQUEST['timeend'])+24*60*60-1)); unset($_REQUEST['timestart']);unset($_REQUEST['timeend']); @@ -2596,26 +2623,41 @@ class ExportController extends Controller $map['register_way'] =$_REQUEST['register_way']; unset($_REQUEST['register_way']); } - $today=total(1); - $week=total(2); - $mounth=total(3); - //为数据权限添加 + setPowerPromoteIds($map); - $data=$user - ->field('register_way,date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(id) as count, - count(IF(register_time '.$today.',1,null)) as today, - count(IF(register_time '.$week.',1,null)) as week, - count(IF(register_time '.$mounth.',1,null)) as mounth') + + $today = total(1); + $week = total(2); + $mounth = total(3); + $data = $user + ->field('register_way,date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(id) as count') ->where($map) ->group('register_way') - ->order('count desc') + ->order('count desc,register_time') + ->select(); + + $map2 = array(); + $map2['puid'] = 0; + setPowerPromoteIds($map2); + $data2 = $user + ->field('register_way, + count(IF(register_time ' . $today . ',1,null)) as today, + count(IF(register_time ' . $week . ',1,null)) as week, + count(IF(register_time ' . $mounth . ',1,null)) as mounth') + ->where($map2) + ->group('register_way') ->select(); - $count=count($data); + $data2 = array_column($data2, null, 'register_way'); + $count = count($data); foreach ($data as $key => $value) { - static $i=0; + static $i = 0; $i++; - $data[$key]['rand']=$i; + $data[$key]['rand'] = $i; + $data[$key]['today'] = $data2[$value['register_way']]['today']; + $data[$key]['week'] = $data2[$value['register_way']]['week']; + $data[$key]['mounth'] = $data2[$value['register_way']]['mounth']; } + $total=A('Platform')->data_total($data); if($_REQUEST['data_order']!=''){ $data_order=reset(explode(',',$_REQUEST['data_order'])); @@ -2669,27 +2711,42 @@ class ExportController extends Controller $map['pay_way'] = array('in',$_REQUEST['pay_way']) ; unset($_REQUEST['pay_way']); } - $map['pay_status']=1; - $today=total(1); - $week=total(2); - $mounth=total(3); - //为数据权限添加 setPowerPromoteIds($map); - $data=$spend - ->field('pay_way,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time, sum(pay_amount) as count, - sum(IF(pay_time '.$today.',pay_amount,0)) as today, - sum(IF(pay_time '.$week.',pay_amount,0)) as week, - sum(IF(pay_time '.$mounth.',pay_amount,0)) as mounth') + + $map['pay_status'] = 1; + $today = total(1); + $week = total(2); + $mounth = total(3); + $data = $spend + ->field('pay_way,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time, sum(pay_amount) as count') ->where($map) ->group('pay_way') - ->order('count desc') + ->order('count desc,pay_time') ->select(); - $count=count($data); + + $map2 = array(); + $map2['pay_status'] = 1; + setPowerPromoteIds($map2); + $data2 = $spend + ->field('pay_way, + sum(IF(pay_time ' . $today . ',pay_amount,0)) as today, + sum(IF(pay_time ' . $week . ',pay_amount,0)) as week, + sum(IF(pay_time ' . $mounth . ',pay_amount,0)) as mounth') + ->where($map2) + ->group('pay_way') + ->select(); + $data2 = array_column($data2, null, 'pay_way'); + + $count = count($data); foreach ($data as $key => $value) { - static $i=0; + static $i = 0; $i++; - $data[$key]['rand']=$i; + $data[$key]['rand'] = $i; + $data[$key]['today'] = $data2[$value['pay_way']]['today']; + $data[$key]['week'] = $data2[$value['pay_way']]['week']; + $data[$key]['mounth'] = $data2[$value['pay_way']]['mounth']; } + $total = A('Platform')->data_total($data); $this->assign('total',$total); if($_REQUEST['data_order']!=''){ diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index 0ccf54ea5..a7acbcf85 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -44,21 +44,32 @@ class PlatformController extends ThinkController $map['fgame_name'] = $_REQUEST['game_name']; unset($_REQUEST['fgame_name']); } - //为数据权限添加 - setPowerPromoteIds($map); $today = total(1); $week = total(2); $mounth = total(3); + //为数据权限添加 + setPowerPromoteIds($map); $data = $user - ->field('fgame_name,fgame_id,date_format(FROM_UNIXTIME( register_time),"%Y-%m-%d") AS time, count(id) as count, - count(IF(register_time ' . $today . ',1,null)) as today, - count(IF(register_time ' . $week . ',1,null)) as week, - count(IF(register_time ' . $mounth . ',1,null)) as mounth') + ->field('fgame_name,fgame_id,date_format(FROM_UNIXTIME( register_time),"%Y-%m-%d") AS time, count(id) as count') ->where($map) ->group('fgame_id') ->order('count desc,register_time') ->select(); +// dd($data); + $map2 = array(); + $map['fgame_id'] = array('egt', 0); + $map['puid'] = 0; + setPowerPromoteIds($map2); + + $data2 = $user->field('fgame_id,count(IF(register_time ' . $today . ',1,null)) as today, + count(IF(register_time ' . $week . ',1,null)) as week, + count(IF(register_time ' . $mounth . ',1,null)) as mounth') + ->where($map2) + ->group('fgame_id') + ->select(); + $data2 = array_column($data2, null, 'fgame_id'); +// dd($data2); $count = count($data); foreach ($data as $key => $value) { static $i = 0; @@ -68,6 +79,9 @@ class PlatformController extends ThinkController if ($data[$key]['fgame_id'] == 0) { $data[$key]['fgame_name'] = '其他注册'; } + $data[$key]['today'] = $data2[$value['fgame_id']]['today']; + $data[$key]['week'] = $data2[$value['fgame_id']]['week']; + $data[$key]['mounth'] = $data2[$value['fgame_id']]['mounth']; } $total = $this->data_total($data); @@ -110,8 +124,6 @@ class PlatformController extends ThinkController $spend = M('Spend', 'tab_'); $deposit = M('Deposit', "tab_"); - $map['game_id'] = array('gt', 0); - if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { $map['pay_time'] = ['between', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399)]; unset($_REQUEST['timestart']); @@ -132,24 +144,40 @@ class PlatformController extends ThinkController $map['game_id'] = $_REQUEST['game_name']; unset($_REQUEST['game_name']); } + $map['game_id'] = array('gt', 0); $map['pay_status'] = 1; $today = total(1); $week = total(2); $mounth = total(3); + $data = $spend - ->field('game_name,game_id,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time, sum(pay_amount) as count, - sum(IF(pay_time ' . $today . ',pay_amount,0)) as today, - sum(IF(pay_time ' . $week . ',pay_amount,0)) as week, - sum(IF(pay_time ' . $mounth . ',pay_amount,0)) as mounth') + ->field('game_name,game_id,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time, sum(pay_amount) as count') ->where($map) ->where($map) ->group('game_id') ->order('count desc,pay_time') ->select(); + + //今日、本周、本月不随搜索条件而变动 + $map2['pay_status'] = 1; + $map2['game_id'] = array('gt', 0); + setPowerPromoteIds($map2); + $data2 = $spend + ->field('game_id,sum(IF(pay_time ' . $today . ',pay_amount,0)) as today, + sum(IF(pay_time ' . $week . ',pay_amount,0)) as week, + sum(IF(pay_time ' . $mounth . ',pay_amount,0)) as mounth') + ->where($map2) + ->group('game_id') + ->select(); + $data2 = array_column($data2, null, 'game_id'); $count = count($data); foreach ($data as $key => $value) { static $i = 0; $i++; $data[$key]['rand'] = $i; + //加入今日、本周、本月数据 + $data[$key]['today'] = $data2[$value['game_id']]['today']; + $data[$key]['week'] = $data2[$value['game_id']]['week']; + $data[$key]['mounth'] = $data2[$value['game_id']]['mounth']; } $total = $this->data_total($data); $this->assign('total', $total); @@ -219,20 +247,34 @@ class PlatformController extends ThinkController $week = total(2); $mounth = total(3); $data = $user - ->field('register_way,date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(id) as count, - count(IF(register_time ' . $today . ',1,null)) as today, - count(IF(register_time ' . $week . ',1,null)) as week, - count(IF(register_time ' . $mounth . ',1,null)) as mounth') + ->field('register_way,date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(id) as count') ->where($map) ->group('register_way') ->order('count desc,register_time') ->select(); + + $map2 = array(); + $map2['puid'] = 0; + setPowerPromoteIds($map2); + $data2 = $user + ->field('register_way, + count(IF(register_time ' . $today . ',1,null)) as today, + count(IF(register_time ' . $week . ',1,null)) as week, + count(IF(register_time ' . $mounth . ',1,null)) as mounth') + ->where($map2) + ->group('register_way') + ->select(); + $data2 = array_column($data2, null, 'register_way'); $count = count($data); foreach ($data as $key => $value) { static $i = 0; $i++; $data[$key]['rand'] = $i; + $data[$key]['today'] = $data2[$value['register_way']]['today']; + $data[$key]['week'] = $data2[$value['register_way']]['week']; + $data[$key]['mounth'] = $data2[$value['register_way']]['mounth']; } + $total = $this->data_total($data); if ($_REQUEST['data_order'] != '') { $data_order = reset(explode(',', $_REQUEST['data_order'])); @@ -302,20 +344,35 @@ class PlatformController extends ThinkController $week = total(2); $mounth = total(3); $data = $spend - ->field('pay_way,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time, sum(pay_amount) as count, + ->field('pay_way,date_format(FROM_UNIXTIME(pay_time),"%Y-%m-%d") AS time, sum(pay_amount) as count') + ->where($map) + ->group('pay_way') + ->order('count desc,pay_time') + ->select(); + + $map2 = array(); + $map2['pay_status'] = 1; + setPowerPromoteIds($map2); + $data2 = $spend + ->field('pay_way, sum(IF(pay_time ' . $today . ',pay_amount,0)) as today, sum(IF(pay_time ' . $week . ',pay_amount,0)) as week, sum(IF(pay_time ' . $mounth . ',pay_amount,0)) as mounth') - ->where($map) + ->where($map2) ->group('pay_way') - ->order('count desc,pay_time') ->select(); + $data2 = array_column($data2, null, 'pay_way'); + $count = count($data); foreach ($data as $key => $value) { static $i = 0; $i++; $data[$key]['rand'] = $i; + $data[$key]['today'] = $data2[$value['pay_way']]['today']; + $data[$key]['week'] = $data2[$value['pay_way']]['week']; + $data[$key]['mounth'] = $data2[$value['pay_way']]['mounth']; } + $total = $this->data_total($data); $this->assign('total', $total); if ($_REQUEST['data_order'] != '') { diff --git a/Application/Admin/Controller/RechargeSumController.class.php b/Application/Admin/Controller/RechargeSumController.class.php index 6c9946b7b..42571a658 100644 --- a/Application/Admin/Controller/RechargeSumController.class.php +++ b/Application/Admin/Controller/RechargeSumController.class.php @@ -64,7 +64,8 @@ class RechargeSumController extends ThinkController //当天注册人数 $registerNum = D('User')->where(array_merge($rmap, array('puid' => 0)))->join("tab_user_play on tab_user.id = tab_user_play.user_id and tab_user.fgame_id = tab_user_play.game_id", 'left')->field("tab_user.id")->select(); $registerNum = $registerNum ? array_column($registerNum, 'id') : []; - +// if ($key ==2) +// dd(D('User')->_sql()); //当天活跃人数 $livenNum = D('UserPlay')->where($map)->count("id"); From 7ba7de46a365f2060a29c044ff35db6526545fd4 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Thu, 26 Dec 2019 15:58:23 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=B8=B8=E6=88=8F--=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=96=B9=E5=BC=8F=E6=B8=A0=E9=81=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/update.sql b/Data/update.sql index 24a99ce92..391c988f2 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -915,4 +915,4 @@ ADD COLUMN `beta_url` varchar(150) NOT NULL DEFAULT '' COMMENT 'Beta链接'; -- 游戏支付方式渠道配置 ALTER TABLE `tab_game` -ADD COLUMN `pay_config` varchar(255) DEFAULT NULL COMMENT '支付渠道 wx 微信 zfb 支付宝 quick 快捷 (gf 官方 sq 双乾'; \ No newline at end of file +ADD COLUMN `pay_config` varchar(255) NOT NULL COMMENT '支付渠道 wx 微信 zfb 支付宝 quick 快捷 (gf 官方 sq 双乾'; \ No newline at end of file From b0899f3fc92b83a05eaf363d94d034269992da38 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 26 Dec 2019 16:12:22 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=B8=A0=E9=81=93?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1bug=E4=BF=AE=E6=AD=A3=EF=BC=8C=E5=AE=98?= =?UTF-8?q?=E7=BD=91=E4=B8=8E=E6=8E=A8=E5=B9=BF=E5=90=8E=E5=8F=B0=E5=85=85?= =?UTF-8?q?=E5=80=BC=E8=AE=A1=E5=85=A5=E5=B9=B3=E5=8F=B0=E5=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/FinanceController.class.php | 10 ++--- .../Controller/PayChannelController.class.php | 26 ++++++++++--- .../Admin/View/Finance/payTypeStatistics.html | 2 +- .../Admin/View/PayChannel/gameDetail.html | 38 +++++++++++-------- Application/Admin/View/PayChannel/index.html | 8 ++-- 5 files changed, 52 insertions(+), 32 deletions(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 72e6bee61..76b31514d 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -1019,10 +1019,8 @@ class FinanceController extends ThinkController 'pay_source' => 2, 'tab_deposit.pay_status' => 1, 'tab_deposit.pay_way' => ['gt', 0], - 'extend'=>['eq',''] - ,'tab_deposit.create_time'=>$time, + 'tab_deposit.create_time'=>$time, ])->field('tab_deposit.pay_way,"" as pay_type, SUM(tab_deposit.pay_amount) AS balance') - ->join("inner join tab_pay_info on tab_pay_info.order_id=tab_deposit.pay_order_number") ->group('tab_deposit.pay_way') ->select(); foreach ($deposit as $key => $value) { @@ -1076,7 +1074,7 @@ class FinanceController extends ThinkController $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 } - $cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值 + $cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值 } //推广后台 @@ -1101,7 +1099,7 @@ class FinanceController extends ThinkController $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 } - $cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值 + $cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值 } //官网充值 $offcialmap['pay_status'] = 1; @@ -1131,7 +1129,7 @@ class FinanceController extends ThinkController $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 } - $cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值 + $cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值 } foreach ($cashStatistics as $key => $value) { diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index 5396be178..0e704efb2 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -80,7 +80,6 @@ class PayChannelController extends ThinkController ->where($coinMap) ->sum('tab_deposit.pay_amount'); // var_dump($coinSum);die(); - $this->assign('coinSum',$coinSum); $data = array_merge($data,$coinData); $data = $this->unique_multi_array($data,'game_id'); @@ -251,9 +250,9 @@ class PayChannelController extends ThinkController } //汇总数据 - $sumData['pay_amount'] = $sumData['pay_amount'] + $superSignData['pay_amount'] + - $offcialData['pay_amount'] + $bindRechargeData['pay_amount'] + $spreadData['pay_amount']; - $sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin']; + $sumData['pay_amount'] = $sumData['pay_amount'] + $superSignData['pay_amount'] + $bindRechargeData['pay_amount']; + $sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin'] + + $offcialData['pay_amount'] + $spreadData['pay_amount']; $sumData['test_coin'] = $sumData['test_coin']+$offcialTestCost+$testSuperSignCost+$sumData['test_platform_coin']; $sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin']; @@ -277,6 +276,8 @@ class PayChannelController extends ThinkController $payTypeDataExport['pay_amount'] .= $key.':'.$value." "; } } + $payTypeDataExport['pay_amount'] .= "平台币直充金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计):". + ($coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost); $channelDataExport['game_name'] = '支付渠道'; foreach($channelData as $key => $value) { @@ -295,6 +296,8 @@ class PayChannelController extends ThinkController $this->meta_title = "支付渠道统计"; $size = $row;//每页显示的记录数 $data = array_slice($data, ($arraypage - 1) * $size, $size); + //平台币直充金额,下面列表 + $this->assign('coinSum',$coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost); $this->assign('sumData',$sumData); $this->assign('channelData',$channelData); @@ -438,6 +441,9 @@ class PayChannelController extends ThinkController $coinMap['tab_deposit.pay_way'] =$spreadMap['pay_way']=$map['pay_way'] = array('egt',1); $offcialmap['pay_way'] = array('egt',1); if (!empty($_REQUEST['pay_way']) || $_REQUEST['pay_way']=='0') { + if ($_REQUEST['pay_way']=="2") { + $_REQUEST['pay_way'] = ['in', '2,3,4']; + } $map['pay_way'] = $_REQUEST['pay_way']; $coinMap['tab_deposit.pay_way'] = $_REQUEST['pay_way']; $spreadMap['pay_way'] = $_REQUEST['pay_way']; @@ -563,7 +569,11 @@ class PayChannelController extends ThinkController foreach ($sumData as $key => $value) { if ($value['pay_way']>=1) { - $sumAllData['pay_amount'] += $value['pay_amount']; + if($model == 'deposit'||$model == 'coin_pay_order') { + $sumAllData['platform_amount'] += $value['pay_amount']; + } else { + $sumAllData['pay_amount'] += $value['pay_amount']; + } } } @@ -769,7 +779,11 @@ class PayChannelController extends ThinkController foreach ($sumData as $key => $value) { if ($value['pay_way']>=1) { - $sumAllData['pay_amount'] += $value['pay_amount']; + if($model == 'deposit'||$model == 'coin_pay_order') { + $sumAllData['platform_amount'] += $value['pay_amount']; + } else { + $sumAllData['pay_amount'] += $value['pay_amount']; + } } } diff --git a/Application/Admin/View/Finance/payTypeStatistics.html b/Application/Admin/View/Finance/payTypeStatistics.html index 2a15991a3..c32f57384 100644 --- a/Application/Admin/View/Finance/payTypeStatistics.html +++ b/Application/Admin/View/Finance/payTypeStatistics.html @@ -139,7 +139,7 @@ - {$data.pay_type} + 微信{$data.pay_type} {$data.pay_amount} {$data.balance}0 {$data.total}0 diff --git a/Application/Admin/View/PayChannel/gameDetail.html b/Application/Admin/View/PayChannel/gameDetail.html index 1f7a8750f..a185fecf9 100644 --- a/Application/Admin/View/PayChannel/gameDetail.html +++ b/Application/Admin/View/PayChannel/gameDetail.html @@ -71,21 +71,29 @@
-
- + + + +
diff --git a/Application/Admin/View/PayChannel/index.html b/Application/Admin/View/PayChannel/index.html index 3fde629f7..195d04db9 100644 --- a/Application/Admin/View/PayChannel/index.html +++ b/Application/Admin/View/PayChannel/index.html @@ -188,8 +188,8 @@ 官网 - {$offcialData['pay_amount']} - 0 + 0 + {$offcialData['pay_amount']} {$offcialData.test_coin}0 {$offcialData['sum']}0 @@ -198,8 +198,8 @@ 推广后台 - {$spreadData['pay_amount']}0 - 0 + 0 + {$spreadData['pay_amount']} 0 {$spreadData['sum']}0