This commit is contained in:
aozhiwei 2023-12-26 15:32:07 +08:00
parent 33347004a5
commit 6e11c16a12

View File

@ -41,7 +41,7 @@ class MatchController extends BaseAuthedController {
$this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600);
$this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600); $this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600);
$this->refreshKeyExpire($r, TEAMID_KEY . $matchOkDb['target_team'], 1000*600); $this->refreshKeyExpire($r, TEAMID_KEY . $matchOkDb['target_team'], 1000*600);
$this->fillMatchInfo($r, $matchInfo); $this->fillMatchInfo($r, $matchInfo, $matchOkDb);
} else { } else {
$currMatchDb = $this->readCurrMatchTeam($r); $currMatchDb = $this->readCurrMatchTeam($r);
if (empty($currMatchDb)) { if (empty($currMatchDb)) {
@ -54,7 +54,7 @@ class MatchController extends BaseAuthedController {
} else { } else {
if ($currMatchDb['current_team'] != $teamUuid) { if ($currMatchDb['current_team'] != $teamUuid) {
$this->matchOk($r, $teamUuid, $currMatchDb); $this->matchOk($r, $teamUuid, $currMatchDb);
$this->fillMatchInfo($r, $matchInfo); $this->fillMatchInfo($r, $matchInfo, $this->readMatchOk($r, $teamUuid));
} }
} }
} }
@ -143,8 +143,11 @@ class MatchController extends BaseAuthedController {
} }
} }
private function fillMatchInfo($r, &$matchInfo) private function fillMatchInfo($r, &$matchInfo, $matchOkDb)
{ {
if (empty($matchOkDb)) {
return;
}
$matchInfo['state'] = 1; $matchInfo['state'] = 1;
} }