From 21ad2f03412f3f1296b141a49116dd9f016959c4 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Fri, 22 Nov 2019 17:04:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/DownloadController.class.php | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 47d5583fe..b1daad232 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -412,7 +412,8 @@ class DownloadController extends BaseController { $initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime'); $begTime = strtotime($initBegTime); $endTime = strtotime($initEndTime); - + $gameId = intval(I('game_id', 0)); + $status = intval(I('status', 0)); $map['chain'] = ['like', $this->loginPromote['chain'] . $this->loginPromote['id'] . '/%']; $ids = M('promote', 'tab_')->where($map)->getField('id', true); $ids[] = $this->loginPromote['id']; @@ -423,7 +424,9 @@ class DownloadController extends BaseController { if (!empty($payOrderNumber)) { $map['pay_order_number'] = $payOrderNumber; } - + if (!empty($gameId)) { + $map['game_id'] = $gameId; + } if (!empty($begTime) && empty($endTime)) { $map['pay_time'] = ['egt', $begTime]; } elseif (empty($begTime) && !empty($endTime)) { @@ -431,6 +434,22 @@ class DownloadController extends BaseController { } elseif (!empty($begTime) && !empty($endTime)) { $map['pay_time'] = ['between', [$begTime, $endTime + 86399]]; } + + if (isset($_GET['status'])) { + if ($status == -2) { + $map['selle_status'] = 0; + } else { + $withdrawMap['promote_id'] = $this->loginPromote['id']; + $withdrawMap['status'] = $status; + $withdrawIds = M('withdraw', 'tab_')->where($withdrawMap)->getField('id', true); + + if (empty($withdrawIds)) { + $map = '1 = 2'; + } else { + $map['withdraw_id'] = ['in', $withdrawIds]; + } + } + } $conditions = json_encode($map,TRUE); $addtime = time(); $data = [ From ae18f1fb244fd06ef9911d4878a1546423b7ba80 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 22 Nov 2019 17:08:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PlatformController.class.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index 393455386..79f09c30b 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -387,19 +387,24 @@ class PlatformController extends ThinkController ->group('tp1.id') ->order('count desc, register_time') ->select(); - + unset($map['tp1.id']); + unset($map['tp1.chain']); + $map['promote_id'] = 0; //官方渠道数据添加 $authorityData = M('user', 'tab_')->field('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') - ->where(['promote_id'=>0]) + ->where($map) ->find(); $authorityData['promote_account'] = "官方渠道"; $authorityData['id'] = "1"; -// $authorityData = []; + if (isset($_REQUEST['promote_id'])||$authorityData['count']==0) { + $authorityData = []; + } else { + array_push($data, $authorityData); + } - array_push($data, $authorityData); //数据排序 $last_names = array_column($data,'count'); array_multisort($last_names,SORT_DESC,$data);