From e7f9d1b6f36f1e4001716314e8a8c89a5393057b Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 21 Nov 2019 22:15:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=B1=87=E6=80=BB--bug=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 16 +- .../View/default/Query/userRecharges.html | 144 +++++++++++------- .../Home/View/default/Query/userRoles.html | 107 +++++++------ 3 files changed, 156 insertions(+), 111 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 13c824f22..922ffbeb4 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1822,7 +1822,7 @@ class QueryController extends BaseController ->field('sum(uc . recharge_count) count') ->where($spendMap) ->buildSql(); - $spendMap['uc . create_time'] = ['between', [strtotime(date('Y - m - d 00:00:00')), strtotime(date('Y - m - d 23:59:59'))]]; + $spendMap['uc . create_time'] = ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]]; $sqlTodayCost = M('user_play_data_count', 'tab_')->alias('uc') ->field('sum(uc . recharge_count) count') ->where($spendMap) @@ -1856,7 +1856,7 @@ class QueryController extends BaseController 'promote_id' => $role['promote_id'], 'promote_account' => $role['promote_account'], 'sdk_version' => $role['sdk_version'], - 'unlogin_day' => intval((strtotime(date('Y - m - d 00:00:00')) - strtotime(date('Y - m - d 00:00:00', $role['play_time']))) / (24 * 3600)) + 'unlogin_day' => intval((strtotime(date('Y-m-d 00:00:00')) - strtotime(date('Y-m-d 00:00:00', $role['play_time']))) / (24 * 3600)) ]; } } @@ -1954,11 +1954,11 @@ class QueryController extends BaseController public function achievement() { - $time = I('time', date('Y - m - d')); + $time = I('time', date('Y-m-d')); if (!empty($time)) { $defaultTime = $time; } else { - $defaultTime = date('Y - m - d', time()); + $defaultTime = date('Y-m-d', time()); } $sdkVersion = I('sdk_version', 0); $gameId = I('game_id', 0); @@ -2003,14 +2003,14 @@ class QueryController extends BaseController if (count($ids) > 0) { $rows = M('promote', 'tab_') ->field(['id', 'chain']) - ->where(['chain' => ['like', [$parent['chain'] . $parent['id'] . ' /%']], 'level' => ['gt', $parent['level'] + 1]]) + ->where(['chain' => ['like', [$parent['chain'] . $parent['id'] . '/%']], 'level' => ['gt', $parent['level'] + 1]]) ->select(); } $basicPromotes = []; foreach ($ids as $id) { foreach ($rows as $row) { - $needChain = $parent['chain'] . $parent['id'] . ' / ' . $id . ' / '; + $needChain = $parent['chain'] . $parent['id'] . '/' . $id . '/'; if (strpos($row['chain'], $needChain) !== false) { $basicPromotes[$row['id']] = $id; } @@ -2135,11 +2135,11 @@ class QueryController extends BaseController public function userPlayDataCount() { - $time = strtotime(date('Y - m - d 00:00:00', time() - (3600 * 24))); + $time = strtotime(date('Y-m-d 00:00:00', time() - (3600 * 24))); $spendMap['pay_status'] = 1; $spendMap['pay_game_status'] = 1; $spendMap['game_player_id'] = ['gt', 0]; - $spendMap['pay_time'] = ['between', [$time, strtotime(date('Y - m - d 23:59:59', $time))]]; + $spendMap['pay_time'] = ['between', [$time, strtotime(date('Y-m-d 23:59:59', $time))]]; $field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count'; $spendCostData = M('spend', 'tab_')->field($field) diff --git a/Application/Home/View/default/Query/userRecharges.html b/Application/Home/View/default/Query/userRecharges.html index db7089733..f09abebed 100644 --- a/Application/Home/View/default/Query/userRecharges.html +++ b/Application/Home/View/default/Query/userRecharges.html @@ -33,64 +33,63 @@ 玩家充值
-