From 88c64e67001b5ff970f9965d05b497147dfe9a69 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 26 Nov 2021 14:11:33 +0800 Subject: [PATCH] 1 --- .../controller/BaseAuthedController.class.php | 8 +++---- webapp/controller/BaseController.class.php | 2 +- webapp/controller/GunController.class.php | 22 +++++++++---------- webapp/controller/UserController.class.php | 12 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/webapp/controller/BaseAuthedController.class.php b/webapp/controller/BaseAuthedController.class.php index fdaf297..1b74d38 100644 --- a/webapp/controller/BaseAuthedController.class.php +++ b/webapp/controller/BaseAuthedController.class.php @@ -244,7 +244,7 @@ class BaseAuthedController extends BaseController { ), array( 'item_num' => function () use($item) { return "item_num + {$item['item_num']}";}, - 'modifytime' => $this->getNowTime() + 'modifytime' => $this->_getNowTime() ), array( 'accountid' => $this->getAccountId(), @@ -253,8 +253,8 @@ class BaseAuthedController extends BaseController { 'status' => 1, 'active_time' => 0, 'item_num' => $item['item_num'], - 'createtime' => $this->getNowTime(), - 'modifytime' => $this->getNowTime() + 'createtime' => $this->_getNowTime(), + 'modifytime' => $this->_getNowTime() ) ); } @@ -285,7 +285,7 @@ class BaseAuthedController extends BaseController { 'num' => function () use($item) { return "CASE WHEN num < {$item['item_num']} THEN 0 ELSE num - {$item['item_num']} END"; }, - 'modify_time' => $this->getNowTime() + 'modify_time' => $this->_getNowTime() ) ); } diff --git a/webapp/controller/BaseController.class.php b/webapp/controller/BaseController.class.php index db19c8f..3f13730 100644 --- a/webapp/controller/BaseController.class.php +++ b/webapp/controller/BaseController.class.php @@ -33,7 +33,7 @@ class BaseController { public function _getTodayRemainSeconds() { - return max(0, $this->getNowDaySeconds() + 3600 * 24 - $this->getNowTime()); + return max(0, $this->getNowDaySeconds() + 3600 * 24 - $this->_getNowTime()); } public function _rspErr($errcode, $errmsg) diff --git a/webapp/controller/GunController.class.php b/webapp/controller/GunController.class.php index ca251d0..a9489df 100644 --- a/webapp/controller/GunController.class.php +++ b/webapp/controller/GunController.class.php @@ -92,15 +92,15 @@ class GunController extends BaseAuthedController { ), array( 'skill_lv' => $talentLv, - 'modifytime' => $this->getNowTime() + 'modifytime' => $this->_getNowTime() ), array( 'accountid' => $this->getAccountId(), 'gun_type_id' => $gunTypeId, 'skill_id' => $talentId, 'skill_lv' => $talentLv, - 'createtime' => $this->getNowTime(), - 'modifytime' => $this->getNowTime() + 'createtime' => $this->_getNowTime(), + 'modifytime' => $this->_getNowTime() ) ); $this->rspRawData(array( @@ -177,8 +177,8 @@ class GunController extends BaseAuthedController { 'gun_id' => $gunId, 'skin_id' => $skinId, 'trytime' => 0, - 'createtime' => $this->getNowTime(), - 'modifytime' => $this->getNowTime() + 'createtime' => $this->_getNowTime(), + 'modifytime' => $this->_getNowTime() ) ); $this->rspRawData(array( @@ -246,15 +246,15 @@ class GunController extends BaseAuthedController { ), array( 'trytime' => 0, - 'modifytime' => $this->getNowTime() + 'modifytime' => $this->_getNowTime() ), array( 'accountid' => $this->getAccountId(), 'gun_id' => $gunId, 'skin_id' => $skinId, 'trytime' => 0, - 'createtime' => $this->getNowTime(), - 'modifytime' => $this->getNowTime() + 'createtime' => $this->_getNowTime(), + 'modifytime' => $this->_getNowTime() ) ); @@ -267,15 +267,15 @@ class GunController extends BaseAuthedController { ), array( 'skin_id' => $skinId, - 'modifytime' => $this->getNowTime() + 'modifytime' => $this->_getNowTime() ), array( 'accountid' => $this->getAccountId(), 'gun_id' => $gunId, 'skin_id' => $skinId, 'trytime' => 0, - 'createtime' => $this->getNowTime(), - 'modifytime' => $this->getNowTime() + 'createtime' => $this->_getNowTime(), + 'modifytime' => $this->_getNowTime() ) ); } diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index d5a3369..962642b 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -72,8 +72,8 @@ class UserController extends BaseAuthedController { #'integral' => 0, #'season_time' => mt\Season::getCurrSeasonTime(), #'team_name' => '', - 'createtime' => $this->getNowTime(), - 'modifytime' => $this->getNowTime(), + 'createtime' => $this->_getNowTime(), + 'modifytime' => $this->_getNowTime(), ) ); { @@ -159,7 +159,7 @@ class UserController extends BaseAuthedController { } if (($userInfo['kill_his'] + $kills) / ($userInfo['game_times'] + 1) != $k) { $this->updateUserInfo(array( - 'kill_modifytime' => $this->getNowTime(), + 'kill_modifytime' => $this->_getNowTime(), )); } //更新胜场信息时间 @@ -167,7 +167,7 @@ class UserController extends BaseAuthedController { $this->updateUserInfo(array( 'win_times' => $userInfo['win_times'] + 1, 'season_win' => $userInfo['season_win'] + 1, - 'win_modifytime' => $this->getNowTime(), + 'win_modifytime' => $this->_getNowTime(), )); } //更新排位积分信息时间 @@ -182,7 +182,7 @@ class UserController extends BaseAuthedController { } $this->updateUserInfo(array( 'integral' => $update_score, - 'rank_modifytime' => $this->getNowTime(), + 'rank_modifytime' => $this->_getNowTime(), 'max_integral' => $update_maxscore, )); } @@ -237,7 +237,7 @@ class UserController extends BaseAuthedController { 'coin_num' => function () use($coin_num) { return "coin_num + ${coin_num}"; }, - 'modify_time' => $this->getNowTime(), + 'modify_time' => $this->_getNowTime(), 'box_num' => $box_num, 'score' => function () { return 'score'; //??