1
This commit is contained in:
parent
a5f1bad99b
commit
a83b753f83
@ -22,6 +22,19 @@ class Season extends BaseModel {
|
||||
return $row;
|
||||
}
|
||||
|
||||
public static function findByAccount($accountId,$seasonId)
|
||||
{
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getSelfMysql(),
|
||||
't_season',
|
||||
array(
|
||||
'account_id' => $accountId,
|
||||
'season_id' => $seasonId,
|
||||
)
|
||||
);
|
||||
return $row;
|
||||
}
|
||||
|
||||
public static function toDto($row)
|
||||
{
|
||||
return array(
|
||||
|
@ -214,7 +214,7 @@ class User extends BaseModel {
|
||||
$currSeasonMeta = mt\RankSeason::getCurrentSeason();
|
||||
$gameTimes = 0;
|
||||
if ($currSeasonMeta){
|
||||
$season = Season::find($currSeasonMeta['id']);
|
||||
$season = Season::findByAccount($row['account_id'],$currSeasonMeta['id']);
|
||||
if ($season){
|
||||
$battleData = json_decode($season['battle_data'], true);
|
||||
$seasonBattleData = isset($battleData) ? getXVal($battleData, 'season_data', array()) : array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user