This commit is contained in:
hujiabin 2024-01-30 16:26:04 +08:00
parent 65881f4629
commit c59f02d7c7
2 changed files with 4 additions and 2 deletions

View File

@ -94,7 +94,7 @@ class RankingController extends BaseAuthedController {
'value' => 0, 'value' => 0,
'modifytime' => 0, 'modifytime' => 0,
); );
$row = RankBattle::find($type); $row = RankBattle::find($mode,$class,$type);
if ($row){ if ($row){
$myRanked['value'] = $row['value']; $myRanked['value'] = $row['value'];
$myRanked['modifytime'] = $row['modifytime']; $myRanked['modifytime'] = $row['modifytime'];

View File

@ -110,7 +110,7 @@ class RankBattle extends BaseModel
return $rows; return $rows;
} }
public static function find($type){ public static function find($mode,$class,$type){
if (!self::inspectType($type)){ if (!self::inspectType($type)){
return array(); return array();
} }
@ -120,6 +120,8 @@ class RankBattle extends BaseModel
array( array(
'account_id' => myself()->_getAccountId(), 'account_id' => myself()->_getAccountId(),
'type' => $type, 'type' => $type,
'mode' => $mode,
'class' => $class,
) )
); );
return $row ? $row : null; return $row ? $row : null;