From 9f60171191ff16422c3a5e1a5a3113e12cba17bf Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 3 Dec 2019 18:09:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E6=A6=82=E5=86=B5?= =?UTF-8?q?=E5=90=88=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/DownloadController.class.php | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 52500fe8a..699eced67 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2769,7 +2769,20 @@ class DownloadController extends BaseController { $spendGenericList = $spendRepository->getPayAmountGroupByDayAndType($params);//通用币充值 $params['pay_way'] = -1; $spendBindingList = $spendRepository->getPayAmountGroupByDayAndType($params);//绑定币充值 - + $allData['role_num'] = 0; + $allData['user_num'] = 0; + $allData['new_user_num'] = 0; + $allData['new_device_num'] = 0; + $allData['new_ip_num'] = 0; + $allData['login_user_num'] = 0; + $allData['spend_user_num'] = 0; + $allData['spend_num'] = 0; + $allData['spend_all_amount'] = 0; + $allData['spend_cash'] = 0; + $allData['spend_generic'] = 0; + $allData['spend_binding'] = 0; + $allData['spend_discount'] = 0; + $allData['spend_voucher'] = 0; foreach ($params['dayList'] as $day) { $date = date('Ymd', strtotime($day)); $records[] = [ @@ -2789,12 +2802,29 @@ class DownloadController extends BaseController { 'spend_discount' => 0, 'spend_voucher' => 0, ]; + $allData['role_num'] += $roleNumList[$day]; + $allData['user_num'] += $userNumList[$day]; + $allData['new_user_num'] += $newUserNumList[$day]; + $allData['new_device_num'] += $newDeviceNumList[$day]; + $allData['new_ip_num'] += $newIpNumList[$day]; + $allData['login_user_num'] += $loginUserNumList[$day]; + $allData['spend_user_num'] += $spendUserNumList[$day]; + $allData['spend_num'] += $spendNumList[$day]; + $allData['spend_all_amount'] = bcadd($allData['spend_all_amount'], $spendAllAmountList[$day], 2); + $allData['spend_cash'] = bcadd($allData['spend_cash'], $spendCashList[$day], 2); + $allData['spend_generic'] = bcadd($allData['spend_generic'], $spendGenericList[$day], 2); + $allData['spend_binding'] = bcadd($allData['spend_binding'], $spendBindingList[$day], 2); + $allData['spend_discount'] = bcadd($allData['spend_discount'], 0, 2); + $allData['spend_voucher'] = bcadd($allData['spend_voucher'], 0, 2); } + $allData['day'] = '合计'; + $records[] = $allData; $xlsData = []; foreach ($records as $key1 => $value1) { $xlsData[] = $value1; } + $this->exportExcel($xlsName, $xlsCell, $xlsData,$id); } From 28ae254ebd2ca4f720125aa741b154614c4c4cbe Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Tue, 3 Dec 2019 18:38:47 +0800 Subject: [PATCH 2/3] =?UTF-8?q?SQL=20=E8=AF=AD=E5=8F=A5=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Data/update.sql b/Data/update.sql index d9e6deaf4..30522280a 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -617,4 +617,8 @@ MODIFY COLUMN `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '类型 0 -- user表注册类型添加7虚拟 ALTER TABLE `tab_user` MODIFY COLUMN `register_type` tinyint(2) DEFAULT '1' COMMENT '注册方式 0游客1账号 2 手机 3微信 4QQ 5百度 6微博 7虚拟'; -ALTER TABLE `tab_game_source` add COLUMN `is_new_sdk` tinyint(2) DEFAULT '0' COMMENT '是否新SDK(IOS)'; \ No newline at end of file +ALTER TABLE `tab_game_source` add COLUMN `is_new_sdk` tinyint(2) DEFAULT '0' COMMENT '是否新SDK(IOS)'; + + +--游戏评分字段改为保留小数1位 2019-12-03 郑昌隆--- +ALTER TABLE tab_game MODIFY COLUMN `game_score` double(3,1) DEFAULT '0' COMMENT '游戏评分'; \ No newline at end of file From ef9fe76454a71f10ddcb855be2637169eddc02a9 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 3 Dec 2019 18:40:44 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PromoteController.class.php | 34 ++++++------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index f505a8857..fff5f82d7 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -259,28 +259,21 @@ class PromoteController extends BaseController $whereUser['promote_id'] = ['IN', $promoteId]; - if ($type == 1) { - $pay_time = total(1); - $start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); - $end = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1; - $whereUser['register_time'] = ['between', array($start, $end - 1)]; - $userId = M('user', 'tab_')->field('id')->where($whereUser)->select(); - - } else if ($type == 2) { - $pay_time = total(3); - $start = mktime(0, 0, 0, date('m'), 1, date('Y')); - $end = mktime(0, 0, 0, date('m') + 1, 1, date('Y')) - 1; + if (in_array($type, [1, 2])) { + if ($type == 1) { + $pay_time = total(1); + $start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); + $end = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1; + } else { + $pay_time = total(3); + $start = mktime(0, 0, 0, date('m'), 1, date('Y')); + $end = mktime(0, 0, 0, date('m') + 1, 1, date('Y')) - 1; + } $whereUser['register_time'] = ['between', array($start, $end - 1)]; - $userId = M('user', 'tab_')->field('id')->where($whereUser)->select(); + $userId = M('user', 'tab_')->where($whereUser)->getField('id', true); } -// if ($userId) { -// var_dump($userId); -// } if ($userId) { - - $userId = implode(',', array_column($userId, 'id')); -// var_dump($userId); $map1['user_id'] = $map['user_id'] = ['IN', $userId]; } else if (!$userId && $type != 0) { return array('sum_mounth' => 0, 'sum_today' => 0); @@ -333,9 +326,6 @@ class PromoteController extends BaseController } $data[] = $dbdata; } -// if ($userId) { -// echo $spend->_sql();die(); -// } foreach ($data as $key => $value) { $value['count'] ?: 0; $value['today'] ?: 0; @@ -353,8 +343,6 @@ class PromoteController extends BaseController $total = $this->data_total($data); return $total; -// - } public function data_total($data)