This commit is contained in:
aozhiwei 2023-12-26 17:38:19 +08:00
parent f40ebe1918
commit 37c6a942ae

View File

@ -119,12 +119,15 @@ class MatchController extends BaseAuthedController {
$currMatchDb = $this->readCurrMatchTeam($r); $currMatchDb = $this->readCurrMatchTeam($r);
if (empty($currMatchDb)) { if (empty($currMatchDb)) {
$currMatchDb = array( $currMatchDb = array(
'current_team' => $teamUuid, $teamUuid => array(
'match_time' => $this->_getNowTime() 'current_team' => $teamUuid,
'match_time' => $this->_getNowTime()
)
); );
$r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb)); $r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb));
$this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600); $this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600);
} else { } else {
$currMatchDb = json_decode($currMatchDb, true);
if ($currMatchDb['current_team'] != $teamUuid) { if ($currMatchDb['current_team'] != $teamUuid) {
$this->matchOk($r, $teamUuid, $currMatchDb); $this->matchOk($r, $teamUuid, $currMatchDb);
$this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid)); $this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid));