This commit is contained in:
aozhiwei 2023-12-26 14:34:36 +08:00
parent 28e1c183f4
commit 0d746e5c41

View File

@ -34,9 +34,21 @@ class MatchController extends BaseAuthedController {
}
$matchOkDb = $this->readMatchOk($r, $teamUuid);
if ($matchOkDb) {
$this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600);
$this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600);
} else {
$currMatchDb = $this->readCurrMatchTeam($r);
if (empty($currMatchDb)) {
$currMatchDb = array(
'current_team' => $teamUuid,
'match_time' => $this->_getNowTime()
);
$r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb));
$this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600);
} else {
}
}
$currMatchDb = $this->readCurrMatchTeam($r);
$this->_rspData(array(
'team_info' => $teamDb
));