From e1ce023900e1eb43a6647b7a08e05f311f79bbf4 Mon Sep 17 00:00:00 2001 From: hujiabin Date: Thu, 30 Mar 2023 20:17:57 +0800 Subject: [PATCH] 1 --- webapp/models/BattleHistory.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/models/BattleHistory.php b/webapp/models/BattleHistory.php index bde219e6..c2adf42b 100644 --- a/webapp/models/BattleHistory.php +++ b/webapp/models/BattleHistory.php @@ -59,13 +59,13 @@ class BattleHistory extends BaseModel public static function toDto($row){ if ($row['hero_id']){ - $row['hero_id'] = Hero::find($row['hero_id'])['hero_id']; + $row['hero_id'] = Hero::findByAccountId($row['account_id'],$row['hero_id'])['hero_id']; } if ($row['weapon1']){ - $row['weapon1'] = Gun::find($row['weapon1'])['gun_id']; + $row['weapon1'] = Gun::findByAccountId($row['account_id'],$row['weapon1'])['gun_id']; } if ($row['weapon2']){ - $row['weapon2'] = Gun::find($row['weapon2'])['gun_id']; + $row['weapon2'] = Gun::findByAccountId($row['account_id'],$row['weapon2'])['gun_id']; } return $row; }