This commit is contained in:
aozhiwei 2023-12-26 13:54:37 +08:00
parent a3ff456262
commit e61198c2a8
2 changed files with 21 additions and 2 deletions

View File

@ -6,7 +6,7 @@ define('DAILY_SELECTION_KEY', 'game2006api:daily_selection:');
define('PLANET_BUY_KEY', 'game2006api:planet_buy:');
define('LAST_SESSION_KEY', 'last_session:');
define('MATCH_KEY', 'match:');
define('MATCH_CURRENT_TEAM_KEY', 'match:current_team:');
define('V_ITEM_GOLD', 10001); //金币
define('V_ITEM_DIAMOND', 10014); //钻石

View File

@ -13,7 +13,6 @@ require_once('mt/StarLevel.php');
require_once('services/PropertyChgService.php');
use phpcommon\SqlHelper;
use models\User;
use models\Hero;
@ -49,4 +48,24 @@ class MatchController extends BaseAuthedController {
$this->_rspOk();
}
private function readTeamDb($r, $teamUuid)
{
$teamDbStr = $r->get(TEAMID_KEY . $teamUuid);
if (empty($teamDbStr)) {
return null;
}
$teamDb = json_decode($teamDbStr, true);
return $teamDb;
}
private function readCurrMatchTeam($r)
{
$teamDbStr = $r->get(MATCH_CURRENT_TEAM_KEY . $teamUuid);
if (empty($teamDbStr)) {
return null;
}
$teamDb = json_decode($teamDbStr, true);
return $teamDb;
}
}