This commit is contained in:
hujiabin 2022-11-24 14:18:34 +08:00
parent a3054bb3ef
commit cceb61982f
4 changed files with 42 additions and 7 deletions

View File

@ -33,6 +33,20 @@ class Battle(object):
_common.RspHead(),
['!data', [_common.BattleHistory()], '战绩数据'],
]
},{
'method': 'GET',
'name': 'showBattleHistory',
'desc': '战绩详情',
'group': 'Battle',
'url': 'webapp/index.php?c=Battle&a=showBattleHistory',
'params': [
_common.ReqHead(),
['battle_uniid', '', ' 战斗唯一id']
],
'response': [
_common.RspHead(),
['info', [], '战绩详情'],
]
},
]
self.internalApis = [

View File

@ -246,7 +246,7 @@ class BattleController extends BaseAuthedController {
myself()->_rspData($data);
}
public function getBattleHistory(){
public function getBattleHistory(){$this->showBattleHistory();die;
$mode = getReqVal('mode', 0);
$historyList = BattleHistory::orderBy(BattleHistory::getMyBattleHistoryByMode($mode),'desc');
$data = array();
@ -260,6 +260,26 @@ class BattleController extends BaseAuthedController {
));
}
public function showBattleHistory(){
$battleUnid = getReqVal('battle_uniid', 0);
if ( !$battleUnid){
$this->_rspErr(1,'param error');
return;
}
$row = BattleSettlement::find($battleUnid);
if (!$row){
$this->_rspErr(1,'param error');
return;
}
$data = $row;
$data['data'] = json_decode($row['data'],true);
$this->_rspData(
array(
'info'=>$data
)
);
}
public function decReviveCoin()
{
$num = getReqVal('num', 1);

View File

@ -251,10 +251,11 @@ class EventRankingController extends BaseAuthedController
}
public function settlementRankingAward(){
$currentRankingMeta = mt\EventRanking::getCurrentRanking();
$awardList = array();
if ($currentRankingMeta){
$lastRankingMeta = mt\EventRanking::find($currentRankingMeta['id']-1);
$id = getReqVal('id', 0);
// $currentRankingMeta = mt\EventRanking::getCurrentRanking();
// $awardList = array();
// if ($currentRankingMeta){
$lastRankingMeta = mt\EventRanking::find($id);
if ($lastRankingMeta){
switch ($lastRankingMeta['themeType']){
case \services\RankActivityService::KILLS_TYPE : {
@ -436,7 +437,7 @@ class EventRankingController extends BaseAuthedController
}
}
}
}
// }
}

View File

@ -30,7 +30,7 @@ class BattleSettlement extends BaseModel
public static function find($battleUuid)
{
$row = SqlHelper::selectOne
$row = SqlHelper::ormSelectOne
(myself()->_getSelfMysql(),
't_battle_settlement',
array(