1
This commit is contained in:
parent
7edd9c4049
commit
c7e9f9f504
@ -3,6 +3,7 @@
|
||||
define('TEAMID_KEY', 'team_uuid:');
|
||||
define('RANKING_KEY', 'game2006api:');
|
||||
define('DAILY_SELECTION_KEY', 'game2006api:daily_selection:');
|
||||
define('PLANET_BUY_KEY', 'game2006api:planet_buy:');
|
||||
|
||||
define('LAST_SESSION_KEY', 'last_session:');
|
||||
|
||||
|
@ -50,4 +50,18 @@ class OutAppPlanetController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
private function load($period)
|
||||
{
|
||||
$rawData = myself()->_getRedis('')->get(PLANET_BUY_KEY . $period);
|
||||
if (empty($rawData)) {
|
||||
return array();
|
||||
}
|
||||
return json_decode($rawData, true);
|
||||
}
|
||||
|
||||
private function save($data)
|
||||
{
|
||||
myself()->_getRedis('')->get(PLANET_BUY_KEY . $period, json_encode($data));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user