This commit is contained in:
hujiabin 2023-03-30 19:59:57 +08:00
parent f0380ec20a
commit 41cf561327
2 changed files with 7 additions and 3 deletions

View File

@ -373,9 +373,13 @@ class BattleController extends BaseAuthedController {
}
public function getBattleHistory(){
$accountId = getReqVal('target_id', 0);
$room_mode = getReqVal('room_mode', 0);
$pvp_mode = getReqVal('pvp_mode', 0);
$singleList = BattleSettlement::getSingleList($room_mode,$pvp_mode);
if (!$accountId){
$accountId = myself()->_getAccountId();
}
$singleList = BattleSettlement::getSingleList($accountId,$room_mode,$pvp_mode);
$historyList = BattleHistory::orderBy($singleList,'desc');
// print_r($data);die;
// $historyList = BattleHistory::orderBy(BattleHistory::getMyBattleHistoryByMode($mode),'desc');

View File

@ -68,13 +68,13 @@ class BattleSettlement extends BaseModel
);
}
public static function getSingleList($roomMode, $matchMode)
public static function getSingleList($accountId,$roomMode, $matchMode)
{
$rows = SqlHelper::ormSelect
(myself()->_getSelfMysql(),
't_battle_settlement_single',
array(
'account_id' => myself()->_getAccountId(),
'account_id' => $accountId,
)
);
$pvpMatchList = array();