From 3ee50bcfc026bd8501e19171c4bf9bad88a0748e Mon Sep 17 00:00:00 2001
From: yulingwei <2436953959@qq.com>
Date: Tue, 26 Nov 2019 17:36:38 +0800
Subject: [PATCH 01/11] upt
---
.../Admin/Controller/ConsoleController.class.php | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/Application/Admin/Controller/ConsoleController.class.php b/Application/Admin/Controller/ConsoleController.class.php
index 9ccebc9f9..b7a89192d 100644
--- a/Application/Admin/Controller/ConsoleController.class.php
+++ b/Application/Admin/Controller/ConsoleController.class.php
@@ -89,12 +89,23 @@ class ConsoleController extends Think {
}
}
+ public function modifyLoginRepair()
+ {
+ $this->modifyLogin(0);
+ }
+
+ public function modifyLoginGenerate()
+ {
+ $this->modifyLogin(strtotime(date("Y-m-d"))-86400);
+ }
+
/**
* 登录校验
*/
- public function modifyLogin()
+ private function modifyLogin($start_time=0)
{
- $start_time = $current_time = strtotime(date("Y-m-d"))-86400;
+ echo $start_time;exit;
+ $current_time = strtotime(date("Y-m-d"))-86400;
for ($i=$start_time; $i<=$current_time; $i+=86400) {
$end_time = $i+86400;
$result = M()->query("SELECT
From d95540c92ccf64b9b0c6c2187dbb7cdc31c4308e Mon Sep 17 00:00:00 2001
From: yulingwei <2436953959@qq.com>
Date: Tue, 26 Nov 2019 17:37:17 +0800
Subject: [PATCH 02/11] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=A5=E5=BF=97?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Controller/ConsoleController.class.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/Application/Admin/Controller/ConsoleController.class.php b/Application/Admin/Controller/ConsoleController.class.php
index a4558c0dc..a9d816208 100644
--- a/Application/Admin/Controller/ConsoleController.class.php
+++ b/Application/Admin/Controller/ConsoleController.class.php
@@ -104,7 +104,6 @@ class ConsoleController extends Think {
*/
private function modifyLogin($start_time=0)
{
- echo $start_time;exit;
$current_time = strtotime(date("Y-m-d"))-86400;
for ($i=$start_time; $i<=$current_time; $i+=86400) {
$end_time = $i+86400;
From c3955dceb83bdc23b61a3683673df487d810ab16 Mon Sep 17 00:00:00 2001
From: yulingwei <2436953959@qq.com>
Date: Tue, 26 Nov 2019 17:43:48 +0800
Subject: [PATCH 03/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Controller/ConsoleController.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application/Admin/Controller/ConsoleController.class.php b/Application/Admin/Controller/ConsoleController.class.php
index a9d816208..71ff3486e 100644
--- a/Application/Admin/Controller/ConsoleController.class.php
+++ b/Application/Admin/Controller/ConsoleController.class.php
@@ -91,7 +91,7 @@ class ConsoleController extends Think {
public function modifyLoginRepair()
{
- $this->modifyLogin(0);
+ $this->modifyLogin(1569686400);
}
public function modifyLoginGenerate()
From e6c2779ee1324950b52c85e3b8763370b40fd766 Mon Sep 17 00:00:00 2001
From: chenxiaojun <956334972@qq.com>
Date: Tue, 26 Nov 2019 18:14:24 +0800
Subject: [PATCH 04/11] =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E8=A7=92=E8=89=B2?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E8=84=9A=E6=9C=AC--?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Admin/Controller/AutoController.class.php | 24 +++++++++++--------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php
index 55602bbcb..97377d250 100644
--- a/Application/Admin/Controller/AutoController.class.php
+++ b/Application/Admin/Controller/AutoController.class.php
@@ -907,6 +907,7 @@ public function auto_rrdae(){
{
$res = M('user_play_data_count', 'tab_')->order('id asc')->find();
if (empty($res)) {
+ ini_set('memory_limit','500M');
$time = strtotime(date('Y-m-d 00:00:00', time()));
$map['pay_time'] = ['lt', $time];
@@ -931,17 +932,20 @@ public function auto_rrdae(){
if (!empty($spendData)) {
$data = [];
- foreach ($spendData as $list) {
- $save['promote_id'] = $list['promote_id'];
- $save['user_id'] = $list['user_id'];
- $save['game_id'] = $list['game_id'];
- $save['server_id'] = $list['server_id'];
- $save['role_id'] = $list['game_player_id'];
- $save['recharge_cost'] = $list['recharge_cost'];
- $save['recharge_count'] = $list['recharge_count'];
- $save['create_time'] = strtotime($list['day']);
- $data[] = $save;
+ foreach ($spendData as &$list) {
+ $data[] = [
+ 'promote_id' => $list['promote_id'],
+ 'user_id' => $list['user_id'],
+ 'game_id' => $list['game_id'],
+ 'server_id' => $list['server_id'],
+ 'role_id' => $list['game_player_id'],
+ 'recharge_cost' => $list['recharge_cost'],
+ 'recharge_count' => $list['recharge_count'],
+ 'create_time' => strtotime($list['day']),
+ ];
+ unset($list);
}
+ unset($spendData);
M('user_play_data_count', 'tab_')->addAll($data);
}
}
From aa7705ecf5b5391fa68d4c01e084a87700d33fac Mon Sep 17 00:00:00 2001
From: yulingwei <2436953959@qq.com>
Date: Tue, 26 Nov 2019 18:29:37 +0800
Subject: [PATCH 05/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Addons/SiteStat/info.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Addons/SiteStat/info.html b/Addons/SiteStat/info.html
index 9b92ecb22..840ef2248 100644
--- a/Addons/SiteStat/info.html
+++ b/Addons/SiteStat/info.html
@@ -96,7 +96,7 @@ $(document).ready(function () {
【游戏充值】 |
游戏充值待补单数 |
- {$daiban['spenc']} |
+ {$daiban['spenc']} |
【APP安卓分包】 |
From f0d28e81c4d89823cdb7b9a380c17e0c9df47ea4 Mon Sep 17 00:00:00 2001
From: sunke <18850253506@163.com>
Date: Tue, 26 Nov 2019 19:47:30 +0800
Subject: [PATCH 06/11] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Home/Controller/DownloadController.class.php | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php
index c5e82e793..a7de2c5ca 100644
--- a/Application/Home/Controller/DownloadController.class.php
+++ b/Application/Home/Controller/DownloadController.class.php
@@ -2439,7 +2439,7 @@ class DownloadController extends BaseController {
$perSize = 5000;//每次查询的条数
$pages = ceil($accessNum / $perSize);
- for($i = 1; $i <= $pages - 1; $i++) {
+ for($i = 1; $i <= $pages; $i++) {
foreach($data as $value) {
mb_convert_variables('GBK', 'UTF-8', $value);
fputcsv($fp, $value);
@@ -2952,7 +2952,7 @@ class DownloadController extends BaseController {
->where($map)
->order('tab_spend.id desc')
->select();
-
+
$csvFileName = $xlsName.'.csv';
//设置好告诉浏览器要下载excel文件的headers
header('Content-Description: File Transfer');
@@ -2967,6 +2967,7 @@ class DownloadController extends BaseController {
$accessNum = count($data1)?:0 ;
$perSize = 5000;//每次查询的条数
$pages = ceil($accessNum / $perSize);
+
for($i = 1; $i <= $pages; $i++) {
$model = M('spend','tab_');
$data = $model
@@ -3017,12 +3018,10 @@ class DownloadController extends BaseController {
$csvData["p_proinfo"] = $value1["p_proinfo"];
$csvData["proinfo"] = $value1["proinfo"];
$csvData["pay_time"] = $value1["pay_time"];
+ mb_convert_variables('GBK', 'UTF-8', $csvData);
+ fputcsv($fp, $csvData);
$xlsData[] = $csvData;
}
- foreach($xlsData as $value) {
- mb_convert_variables('GBK', 'UTF-8', $value);
- fputcsv($fp, $value);
- }
unset($xlsData);
ob_flush();
flush();
From ebfd596a4d82d6bed8aa9845809637c0b9b91d95 Mon Sep 17 00:00:00 2001
From: sunke <18850253506@163.com>
Date: Tue, 26 Nov 2019 19:57:16 +0800
Subject: [PATCH 07/11] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=9D=E5=A7=8B?=
=?UTF-8?q?=E5=8C=96=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Home/Controller/DownloadController.class.php | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php
index a7de2c5ca..22d8a87ac 100644
--- a/Application/Home/Controller/DownloadController.class.php
+++ b/Application/Home/Controller/DownloadController.class.php
@@ -1163,9 +1163,6 @@ class DownloadController extends BaseController {
* @author sunke
*/
public function recharge_data_export() {
- if (empty(I('begtime')) || empty(I('endtime'))) {
- $this->error('请选择起止时间');
- }
$beginTime = strtotime(I('begtime') . ' 00:00:00');
$endtime = strtotime(I('endtime') . ' 23:59:59');
if (($endtime - $beginTime) > 31 * 24 * 3600) {
From d8a59b567051b1b068cdf309d041f30a7256a2c0 Mon Sep 17 00:00:00 2001
From: yulingwei <2436953959@qq.com>
Date: Tue, 26 Nov 2019 20:15:39 +0800
Subject: [PATCH 08/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Admin/Controller/MemberController.class.php | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php
index a20bc258a..c89d06dc9 100644
--- a/Application/Admin/Controller/MemberController.class.php
+++ b/Application/Admin/Controller/MemberController.class.php
@@ -223,9 +223,11 @@ class MemberController extends ThinkController
->group('tab_user.id')
->where($hav)
->having($havs)->select(false);
+
+ $allcountsql = str_replace("tab_user.promote_id","ss.promote_id",$sql);
//获取总额
- $allcount = M()->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $sql . ') as a')->select();
- $this->assign('history_count', $allcount[0]['recharge_total']);
+ $allcount = M()->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $allcountsql . ') as a')->select();
+ $this->assign('history_count', $allcount[0]['recharge_total']?:0);
//替换为新表
if($_REQUEST['promote_id'] && $_REQUEST['promote_id'] > -1){
@@ -240,10 +242,10 @@ class MemberController extends ThinkController
}
$jcount = M('User', 'tab_')->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $sql . ') as a')->select();
- $count = $jcount[0]['count'];
- //var_dump(M('User', 'tab_')->getLastSql());die();
+ $count = $jcount[0]['count'] ?:0 ;
$this->assign('user_count', $count);
- $this->assign('now_count', $jcount[0]['recharge_total']);
+ // var_dump($jcount);die();
+ $this->assign('now_count', $jcount[0]['recharge_total']?:0);
$model = M('Model')->getByName('user');
From 086c95b826c33e2afd3fcfdad80f3b017d943689 Mon Sep 17 00:00:00 2001
From: zhengyongxing
Date: Tue, 26 Nov 2019 20:25:27 +0800
Subject: [PATCH 09/11] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AF=BC=E5=87=BA?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Admin/Controller/ExportController.class.php | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php
index cc38b611b..a68b8924e 100644
--- a/Application/Admin/Controller/ExportController.class.php
+++ b/Application/Admin/Controller/ExportController.class.php
@@ -532,15 +532,17 @@ class ExportController extends Controller
}
unset($xlsData[$k]['age_status']);
unset($xlsData[$k]['register_way']);
+ mb_convert_variables('GBK', 'UTF-8', $v);
+ fputcsv($fp, $v);
}
}
- foreach($xlsData as $value) {
- mb_convert_variables('GBK', 'UTF-8', $value);
- fputcsv($fp, $value);
- $lastId = $value['id'];
- }
+// foreach($xlsData as $value) {
+// mb_convert_variables('GBK', 'UTF-8', $value);
+// fputcsv($fp, $value);
+// $lastId = $value['id'];
+// }
unset($xlsData);//释放变量的内存
//刷新输出缓冲到浏览器
ob_flush();
From d80febf3ac1e0df7f2782b33fd8d1fd65c057c72 Mon Sep 17 00:00:00 2001
From: chenxiaojun <956334972@qq.com>
Date: Tue, 26 Nov 2019 20:31:12 +0800
Subject: [PATCH 10/11] =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E8=A7=92=E8=89=B2?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E8=84=9A=E6=9C=AC--?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Controller/AutoController.class.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php
index 97377d250..21da2b965 100644
--- a/Application/Admin/Controller/AutoController.class.php
+++ b/Application/Admin/Controller/AutoController.class.php
@@ -924,6 +924,7 @@ public function auto_rrdae(){
$map['pay_status'] = 1;
$map['pay_game_status'] = 1;
$map['game_player_id'] = ['gt', 0];
+ $map['server_id'] = ['gt', 0];
$field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,promote_id,user_id,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count';
$spendData = M('spend', 'tab_')->field($field)
->where($map)
From 507e579755e5bcd37a104c7d2b60ad7ab479376a Mon Sep 17 00:00:00 2001
From: chenzhi <“chenzhi063@qq.com>
Date: Tue, 26 Nov 2019 20:42:05 +0800
Subject: [PATCH 11/11] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E7=BB=9F=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controller/MemberController.class.php | 28 ++++---------------
1 file changed, 6 insertions(+), 22 deletions(-)
diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php
index c89d06dc9..7d0a4cb7e 100644
--- a/Application/Admin/Controller/MemberController.class.php
+++ b/Application/Admin/Controller/MemberController.class.php
@@ -123,18 +123,13 @@ class MemberController extends ThinkController
unset($_REQUEST['status']);
}
- $game_map = "";
- if (!empty($_REQUEST['game_name']) || !empty($_REQUEST['game_type'])) {
- $game_map .= " and tab_user_play.game_id in (" . implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) . ")";
- }
-
- $spendprom .= " and ss.game_id in (".implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')).")";
- if (isset($_REQUEST['server_name'])) {
- $spendprom .= " and ss.server_name like '{$_REQUEST['server_name']}%' ";
- }
- $game_play_map = '';
+
+ // if (isset($_REQUEST['game_name'])) {
+ // //$game_map .= " and tab_user_play.game_id in (" . implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) . ")";
+ // }
+ $spendprom = " and ss.game_id in (".implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')).")";
if (isset($_REQUEST['server_name'])) {
- $game_play_map .= " and tab_user_play_info.server_name = '{$_REQUEST['server_name']}' ";
+ $map['server_name'] = ['like', "{$_REQUEST['server_name']}%"];
}
if (isset($_REQUEST['viplevel'])) {
@@ -193,8 +188,6 @@ class MemberController extends ThinkController
if($_REQUEST['promote_id'] && $_REQUEST['promote_id'] > -1){
$data = $usermodel->table('(' . $sql1 . ') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,IFNULL(sum(ss.pay_amount),0) as recharge_total,check_status')
->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1'.$spendprom)
- ->join($game_map ? "tab_user_play on tab_user_play.user_id = a.id $game_map" : false)
- ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = a.id $game_play_map" : false)
->page($page, $row)
->having($havs)
->group('a.id')
@@ -204,8 +197,6 @@ class MemberController extends ThinkController
}else{
$data = $usermodel->table('(' . $sql1 . ') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,IFNULL(sum(ss.pay_amount),0) as recharge_total,check_status')
->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1')
- ->join($game_map ? "tab_user_play on tab_user_play.user_id = a.id $game_map" : false)
- ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = a.id $game_play_map" : false)
->page($page, $row)
->having($havs)
->group('a.id')
@@ -217,8 +208,6 @@ class MemberController extends ThinkController
//计数
$sql = M('user', 'tab_')->field('tab_user.id,IFNULL(sum(ss.pay_amount),0) AS recharge_total')
->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1'.$spendprom)
- ->join($game_map ? "tab_user_play on tab_user_play.user_id = tab_user.id $game_map" : false)
- ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = tab_user.id $game_play_map" : false)
->where($map)
->group('tab_user.id')
->where($hav)
@@ -233,8 +222,6 @@ class MemberController extends ThinkController
if($_REQUEST['promote_id'] && $_REQUEST['promote_id'] > -1){
$sql = M('user', 'tab_')->field('tab_user.id,IFNULL(sum(ss.pay_amount),0) AS recharge_total')
->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1'.$spendprom)
- ->join($game_map ? "tab_user_play on tab_user_play.user_id = tab_user.id $game_map" : false)
- ->join($game_play_map ? "tab_user_play_info on tab_user_play_info.user_id = tab_user.id $game_play_map" : false)
->where($map)
->group('tab_user.id')
->where($hav)
@@ -793,7 +780,6 @@ class MemberController extends ThinkController
}
// $map['type'] = 1;
// $map['login_time'] = ['exp', 'login_time<>0'];
-// $map['login_time'] = ['gt',0];
$extend = array();
$extend['map'] = $map;
@@ -1255,8 +1241,6 @@ class MemberController extends ThinkController
}
if ($type == 2 && !preg_match("/(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/i", $tag)) {
return $this->error("请填写正确的ip信息,如127.0.0.1");
- } else if ($type == 1 && preg_match("/(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/i", $tag)) {
- return $this->error("请填写正确的设备号信息");
}
$map['type'] = $type;
$map['tag'] = $tag;