This commit is contained in:
hujiabin 2023-03-30 20:35:20 +08:00
parent e1ce023900
commit 278402d3fc
2 changed files with 15 additions and 1 deletions

View File

@ -396,6 +396,7 @@ class BattleController extends BaseAuthedController {
public function showBattleHistory(){ public function showBattleHistory(){
$accountId = getReqVal('target_id', '');
$battleUuid = getReqVal('battle_uuid', 0); $battleUuid = getReqVal('battle_uuid', 0);
$roomUuid = getReqVal('room_uuid', 0); $roomUuid = getReqVal('room_uuid', 0);
error_log('showBattleHistory '.json_encode($_REQUEST)); error_log('showBattleHistory '.json_encode($_REQUEST));
@ -407,7 +408,7 @@ class BattleController extends BaseAuthedController {
$this->_rspErr(1,'param room_uuid error'); $this->_rspErr(1,'param room_uuid error');
return; return;
} }
$row = BattleSettlement::findTeam($battleUuid,$roomUuid); $row = BattleSettlement::findTeamByTargetId($accountId,$battleUuid,$roomUuid);
if (!$row){ if (!$row){
$this->_rspErr(1,'param error'); $this->_rspErr(1,'param error');
return; return;

View File

@ -153,5 +153,18 @@ class BattleSettlement extends BaseModel
return $row; return $row;
} }
public static function findTeamByTargetId($targetId,$battleUuid, $roomUuid)
{
$row = SqlHelper::ormSelectOne
(myself()->_getMysql($targetId),
't_battle_settlement_team',
array(
'battle_uuid' => $battleUuid,
'room_uuid' => $roomUuid,
)
);
return $row;
}
} }