From fceb480a433e322a522d983853a482da5168888a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 19:26:40 +0800 Subject: [PATCH] 1 --- webapp/controller/MatchController.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 49c59f77..3f7427c4 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -127,7 +127,6 @@ class MatchController extends BaseAuthedController { $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); } else { - $currMatchDb = json_decode($currMatchDb, true); $delTeams = array(); $selfTeamDb = $currMatchDb[$teamUuid]; if ($selfTeamDb && myself()->_getNowTime() - $selfTeamDb['match_time'] > 7) { @@ -173,10 +172,10 @@ class MatchController extends BaseAuthedController { { { $matchOkDb = array( - 'target_team' => $currMatchDb['current_team'], + 'target_team' => $currMatchDb['team_uuid'], 'match_time' => $this->_getNowTime() ); - $r->set(MATCH_OK_KEY . $teamUuid, json_encode($currMatchDb)); + $r->set(MATCH_OK_KEY . $teamUuid, json_encode($matchOkDb)); $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); } { @@ -184,8 +183,8 @@ class MatchController extends BaseAuthedController { 'target_team' => $teamUuid, 'match_time' => $this->_getNowTime() ); - $r->set(MATCH_OK_KEY . $currMatchDb['current_team'], json_encode($currMatchDb)); - $this->refreshKeyExpire($r, MATCH_OK_KEY . $currMatchDb['current_team'], 1000*600); + $r->set(MATCH_OK_KEY . $currMatchDb['team_uuid'], json_encode($matchOkDb)); + $this->refreshKeyExpire($r, MATCH_OK_KEY . $currMatchDb['team_uuid'], 1000*600); } } @@ -194,6 +193,7 @@ class MatchController extends BaseAuthedController { if (empty($matchOkDb)) { return; } + error_log(json_encode($matchOkDb)); $matchInfo['state'] = 1; { $teamDb = $this->readTeamDb($r, $teamUuid);